Skip to content

Commit 92c3d6a

Browse files
committed
[NVPTX] expand vector_shuffle, insertelt for v2f32 and lower i64 bitcast
Fixes test/CodeGen/Generic/vector.ll
1 parent baaac0e commit 92c3d6a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
653653
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v4i8, Custom);
654654

655655
setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::v2f32, Custom);
656+
setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v2f32, Expand);
657+
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v2f32, Expand);
656658

657659
// Custom conversions to/from v2i8.
658660
setOperationAction(ISD::BITCAST, MVT::v2i8, Custom);

llvm/lib/Target/NVPTX/NVPTXInstrInfo.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,6 +2605,9 @@ foreach ta = [v2f16, v2bf16, v2i16, v4i8, i32] in {
26052605
}
26062606
}
26072607

2608+
def: Pat<(i64 (bitconvert v2f32:$a)),
2609+
(i64 Int64Regs:$a)>;
2610+
26082611
// NOTE: pred->fp are currently sub-optimal due to an issue in TableGen where
26092612
// we cannot specify floating-point literals in isel patterns. Therefore, we
26102613
// use an integer selp to select either 1 (or -1 in case of signed) or 0

0 commit comments

Comments
 (0)