mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[SVE] Lower fixed length vector integer shifts.
Differential Revision: https://reviews.llvm.org/D85724
This commit is contained in:
parent
2e0bb7d648
commit
712e02d446
@ -1107,8 +1107,11 @@ void AArch64TargetLowering::addTypeForFixedLengthSVE(MVT VT) {
|
||||
setOperationAction(ISD::MUL, VT, Custom);
|
||||
setOperationAction(ISD::OR, VT, Custom);
|
||||
setOperationAction(ISD::SETCC, VT, Custom);
|
||||
setOperationAction(ISD::SHL, VT, Custom);
|
||||
setOperationAction(ISD::SIGN_EXTEND, VT, Custom);
|
||||
setOperationAction(ISD::SIGN_EXTEND_INREG, VT, Custom);
|
||||
setOperationAction(ISD::SRA, VT, Custom);
|
||||
setOperationAction(ISD::SRL, VT, Custom);
|
||||
setOperationAction(ISD::STORE, VT, Custom);
|
||||
setOperationAction(ISD::SUB, VT, Custom);
|
||||
setOperationAction(ISD::TRUNCATE, VT, Custom);
|
||||
@ -9053,7 +9056,7 @@ SDValue AArch64TargetLowering::LowerVectorSRA_SRL_SHL(SDValue Op,
|
||||
llvm_unreachable("unexpected shift opcode");
|
||||
|
||||
case ISD::SHL:
|
||||
if (VT.isScalableVector())
|
||||
if (VT.isScalableVector() || useSVEForFixedLengthVectorVT(VT))
|
||||
return LowerToPredicatedOp(Op, DAG, AArch64ISD::SHL_PRED);
|
||||
|
||||
if (isVShiftLImm(Op.getOperand(1), VT, false, Cnt) && Cnt < EltSize)
|
||||
@ -9065,7 +9068,7 @@ SDValue AArch64TargetLowering::LowerVectorSRA_SRL_SHL(SDValue Op,
|
||||
Op.getOperand(0), Op.getOperand(1));
|
||||
case ISD::SRA:
|
||||
case ISD::SRL:
|
||||
if (VT.isScalableVector()) {
|
||||
if (VT.isScalableVector() || useSVEForFixedLengthVectorVT(VT)) {
|
||||
unsigned Opc = Op.getOpcode() == ISD::SRA ? AArch64ISD::SRA_PRED
|
||||
: AArch64ISD::SRL_PRED;
|
||||
return LowerToPredicatedOp(Op, DAG, Opc);
|
||||
|
1152
test/CodeGen/AArch64/sve-fixed-length-int-shifts.ll
Normal file
1152
test/CodeGen/AArch64/sve-fixed-length-int-shifts.ll
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user