Skip to content

Commit e0a812f

Browse files
committed
[NVPTX] only legalze fadd, fsub, fmul, fma for v2f32 on sm_100+
1 parent e699c1a commit e0a812f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
851851
setBF16OperationAction(Op, MVT::bf16, Legal, Promote);
852852
if (getOperationAction(Op, MVT::bf16) == Promote)
853853
AddPromotedToType(Op, MVT::bf16, MVT::f32);
854-
if (STI.hasF32x2Instructions())
855-
setOperationAction(Op, MVT::v2f32, Legal);
854+
setOperationAction(Op, MVT::v2f32,
855+
STI.hasF32x2Instructions() ? Legal : Expand);
856856
}
857857

858858
// On SM80, we select add/mul/sub as fma to avoid promotion to float

0 commit comments

Comments
 (0)