Skip to content

Commit df7eebe

Browse files
toppercchencha3
authored andcommitted
[RISCV] Cleanup setOperationAction for ISD::BITCAST with Zfa and D extension. NFC
We only need Custom handling for i64 on RV32. This will be used by type legalization. We don't need to make it custom for f64 to get type legalization to custom split i64. If f64 and i64 are legal types, then ISD::BITCAST should be legal.
1 parent 03353ae commit df7eebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
562562
if (Subtarget.hasStdExtZfa()) {
563563
setOperationAction(FPRndMode, MVT::f64, Legal);
564564
setOperationAction(ISD::FNEARBYINT, MVT::f64, Legal);
565-
setOperationAction(ISD::BITCAST, MVT::i64, Custom);
566-
setOperationAction(ISD::BITCAST, MVT::f64, Custom);
565+
if (!Subtarget.is64Bit())
566+
setOperationAction(ISD::BITCAST, MVT::i64, Custom);
567567
} else {
568568
if (Subtarget.is64Bit())
569569
setOperationAction(FPRndMode, MVT::f64, Custom);

0 commit comments

Comments
 (0)