Skip to content

Commit 85dba20

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

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
@@ -619,6 +619,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
619619
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v4i8, Custom);
620620

621621
setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::v2f32, Custom);
622+
setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v2f32, Expand);
623+
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v2f32, Expand);
622624

623625
// Custom conversions to/from v2i8.
624626
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
@@ -2896,6 +2896,9 @@ foreach ta = [v2f16, v2bf16, v2i16, v4i8, i32] in {
28962896
}
28972897
}
28982898

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

0 commit comments

Comments
 (0)