[PATCH] D129966: [ARM] Remove VBICimm if no cleared bits are demanded
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 03:54:09 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6cb9529001ba: [ARM] Remove VBICimm if no cleared bits are demanded (authored by dmgreen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129966/new/
https://reviews.llvm.org/D129966
Files:
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
llvm/test/CodeGen/Thumb2/mve-vqmovn-combine.ll
Index: llvm/test/CodeGen/Thumb2/mve-vqmovn-combine.ll
===================================================================
--- llvm/test/CodeGen/Thumb2/mve-vqmovn-combine.ll
+++ llvm/test/CodeGen/Thumb2/mve-vqmovn-combine.ll
@@ -198,9 +198,7 @@
define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_t1(<8 x i16> %s0, <16 x i8> %src1) {
; CHECK-LABEL: vqmovni16_uminmax_t1:
; CHECK: @ %bb.0: @ %entry
-; CHECK-NEXT: vqmovnb.u16 q0, q0
-; CHECK-NEXT: vmovlb.u8 q0, q0
-; CHECK-NEXT: vmovnt.i16 q1, q0
+; CHECK-NEXT: vqmovnt.u16 q1, q0
; CHECK-NEXT: vmov q0, q1
; CHECK-NEXT: bx lr
entry:
@@ -215,7 +213,6 @@
; CHECK-LABEL: vqmovni16_uminmax_t2:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vqmovnb.u16 q0, q0
-; CHECK-NEXT: vmovlb.u8 q0, q0
; CHECK-NEXT: vmovnt.i16 q0, q1
; CHECK-NEXT: bx lr
entry:
@@ -229,9 +226,7 @@
define arm_aapcs_vfpcc <16 x i8> @vqmovni16_uminmax_b1(<8 x i16> %s0, <16 x i8> %src1) {
; CHECK-LABEL: vqmovni16_uminmax_b1:
; CHECK: @ %bb.0: @ %entry
-; CHECK-NEXT: vqmovnb.u16 q0, q0
-; CHECK-NEXT: vmovlb.u8 q0, q0
-; CHECK-NEXT: vmovnb.i16 q1, q0
+; CHECK-NEXT: vqmovnb.u16 q1, q0
; CHECK-NEXT: vmov q0, q1
; CHECK-NEXT: bx lr
entry:
Index: llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
===================================================================
--- llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
+++ llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
@@ -3099,11 +3099,8 @@
; CHECK-NEXT: vldrb.u8 q1, [r1], #16
; CHECK-NEXT: vmullt.u8 q2, q1, q0
; CHECK-NEXT: vmullb.u8 q0, q1, q0
-; CHECK-NEXT: vqshrnb.u16 q2, q2, #7
; CHECK-NEXT: vqshrnb.u16 q0, q0, #7
-; CHECK-NEXT: vmovlb.u8 q2, q2
-; CHECK-NEXT: vmovlb.u8 q0, q0
-; CHECK-NEXT: vmovnt.i16 q0, q2
+; CHECK-NEXT: vqshrnt.u16 q0, q2, #7
; CHECK-NEXT: vstrb.8 q0, [r2], #16
; CHECK-NEXT: le lr, .LBB21_4
; CHECK-NEXT: @ %bb.5: @ %middle.block
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -19996,6 +19996,14 @@
}
break;
}
+ case ARMISD::VBICIMM: {
+ SDValue Op0 = Op.getOperand(0);
+ unsigned ModImm = Op.getConstantOperandVal(1);
+ unsigned EltBits = 0;
+ uint64_t Mask = ARM_AM::decodeVMOVModImm(ModImm, EltBits);
+ if ((OriginalDemandedBits & Mask) == 0)
+ return TLO.CombineTo(Op, Op0);
+ }
}
return TargetLowering::SimplifyDemandedBitsForTargetNode(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129966.445770.patch
Type: text/x-patch
Size: 2553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220719/8e09e6fd/attachment.bin>
More information about the llvm-commits
mailing list