Skip to content

Commit 901cb39

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

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
@@ -846,8 +846,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
846846
setBF16OperationAction(Op, MVT::bf16, Legal, Promote);
847847
if (getOperationAction(Op, MVT::bf16) == Promote)
848848
AddPromotedToType(Op, MVT::bf16, MVT::f32);
849-
if (STI.hasF32x2Instructions())
850-
setOperationAction(Op, MVT::v2f32, Legal);
849+
setOperationAction(Op, MVT::v2f32,
850+
STI.hasF32x2Instructions() ? Legal : Expand);
851851
}
852852

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

0 commit comments

Comments
 (0)