summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/not-and-simplify.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-09-25 19:26:08 +0000
committerCraig Topper <craig.topper@intel.com>2017-09-25 19:26:08 +0000
commit5bc10ede53000011f43f4943e8307304c77807b1 (patch)
tree3c03699b9021f2abbe1729b1b59678c53aeb9f48 /llvm/test/CodeGen/X86/not-and-simplify.ll
parent68c730a1b22b0f1a3015b9b3f49b53f84539164a (diff)
downloadbcm5719-llvm-5bc10ede53000011f43f4943e8307304c77807b1.tar.gz
bcm5719-llvm-5bc10ede53000011f43f4943e8307304c77807b1.zip
[SelectionDAG] Teach simplifyDemandedBits to handle shifts by constant splat vectors
This teach simplifyDemandedBits to handle constant splat vector shifts. This required changing some uses of getZExtValue to getLimitedValue since we can't rely on legalization using getShiftAmountTy for the shift amount. I believe there may have been a bug in the ((X << C1) >>u ShAmt) handling where we didn't check if the inner shift was too large. I've fixed that here. I had to add new patterns to ARM because the zext/sext the patterns were trying to look for got turned into an any_extend with this patch. Happy to split that out too, but not sure how to test without this change. Differential Revision: https://reviews.llvm.org/D37665 llvm-svn: 314139
Diffstat (limited to 'llvm/test/CodeGen/X86/not-and-simplify.ll')
-rw-r--r--llvm/test/CodeGen/X86/not-and-simplify.ll4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/X86/not-and-simplify.ll b/llvm/test/CodeGen/X86/not-and-simplify.ll
index 87aa10a6e29..8ecc859bead 100644
--- a/llvm/test/CodeGen/X86/not-and-simplify.ll
+++ b/llvm/test/CodeGen/X86/not-and-simplify.ll
@@ -47,9 +47,7 @@ define i8 @shrink_xor_constant2(i8 %x) {
define <16 x i8> @shrink_xor_constant2_splat(<16 x i8> %x) {
; ALL-LABEL: shrink_xor_constant2_splat:
; ALL: # BB#0:
-; ALL-NEXT: psllw $5, %xmm0
-; ALL-NEXT: pand {{.*}}(%rip), %xmm0
-; ALL-NEXT: pandn {{.*}}(%rip), %xmm0
+; ALL-NEXT: movaps {{.*#+}} xmm0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
; ALL-NEXT: retq
%sh = shl <16 x i8> %x, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
%not = xor <16 x i8> %sh, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
OpenPOWER on IntegriCloud