]> granicus.if.org Git - llvm/commitdiff
[X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for...
authorCraig Topper <craig.topper@intel.com>
Thu, 20 Jul 2017 19:29:58 +0000 (19:29 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 20 Jul 2017 19:29:58 +0000 (19:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308657 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrCompiler.td
test/CodeGen/X86/shift-and.ll

index 9d188d3d5e541044b7a2ba1c9f58bd8d23e81747..3547c6526f1366a9a45f9e5e658052b0271fa4a9 100644 (file)
@@ -1654,7 +1654,7 @@ multiclass MaskedShiftAmountPats<SDNode frag, string name> {
   // (shift x (and y, 63)) ==> (shift x, y)
   def : Pat<(frag GR64:$src1, (and CL, immShift64)),
             (!cast<Instruction>(name # "64rCL") GR64:$src1)>;
-  def : Pat<(store (frag (loadi64 addr:$dst), (and CL, 63)), addr:$dst),
+  def : Pat<(store (frag (loadi64 addr:$dst), (and CL, immShift64)), addr:$dst),
             (!cast<Instruction>(name # "64mCL") addr:$dst)>;
 }
 
index bb8eaa3c1cb4475ee51cf64a7daf53b2c2eb7d53..c61bff72ca6f39d7308f33361e23816ef7c3fb95 100644 (file)
@@ -99,7 +99,6 @@ define i64 @t5(i64 %t, i64 %val) nounwind {
 define void @t5ptr(i64 %t, i64* %ptr) nounwind {
 ; X64-LABEL: t5ptr:
 ; X64:       ## BB#0:
-; X64-NEXT:    andb $-65, %dil
 ; X64-NEXT:    movl %edi, %ecx
 ; X64-NEXT:    shrq %cl, (%rsi)
 ; X64-NEXT:    retq