Skip to content

Commit e1629ef

Browse files
committed
[NVPTX] expand fexp2 and flog2 for v2f32
1 parent d561412 commit e1629ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,14 +1024,16 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
10241024
setFP16OperationAction(ISD::FEXP2, MVT::v2f16, Legal, Expand);
10251025
setBF16OperationAction(ISD::FEXP2, MVT::bf16, Legal, Promote);
10261026
setBF16OperationAction(ISD::FEXP2, MVT::v2bf16, Legal, Expand);
1027+
setOperationAction(ISD::FEXP2, MVT::v2f32, Expand);
10271028

10281029
// FLOG2 supports f32 only
10291030
// f16/bf16 types aren't supported, but they are promoted/expanded to f32.
10301031
if (UseApproxLog2F32) {
10311032
setOperationAction(ISD::FLOG2, MVT::f32, Legal);
10321033
setOperationPromotedToType(ISD::FLOG2, MVT::f16, MVT::f32);
10331034
setOperationPromotedToType(ISD::FLOG2, MVT::bf16, MVT::f32);
1034-
setOperationAction(ISD::FLOG2, {MVT::v2f16, MVT::v2bf16}, Expand);
1035+
setOperationAction(ISD::FLOG2, {MVT::v2f16, MVT::v2bf16, MVT::v2f32},
1036+
Expand);
10351037
}
10361038

10371039
setOperationAction(ISD::ADDRSPACECAST, {MVT::i32, MVT::i64}, Custom);

0 commit comments

Comments
 (0)