[PATCH] D55722: [DAGCombiner] scalarize binop followed by extractelement

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 15 05:00:49 PST 2018


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15578
+    // extractelt (binop X, C), IndexC --> binop (extractelt X, IndexC), C'
+    // extractelt (binop C, X), IndexC --> binop C', (extractelt X, IndexC)
+    SDLoc DL(ExtElt);
----------------
I wonder whether we need a oneuse check on the constant as well? Some of the cases below suggest that a vector constant load might be happening whatever.


================
Comment at: test/CodeGen/SystemZ/knownbits.ll:51
   %7 = or i1 %6, undef
   br i1 %7, label %9, label %8
 
----------------
This will need rebasing after rL349264


================
Comment at: test/CodeGen/X86/and-load-fold.ll:11
 ; CHECK-NEXT:    punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
-; CHECK-NEXT:    punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
-; CHECK-NEXT:    pand {{.*}}(%rip), %xmm0
-; CHECK-NEXT:    pextrw $4, %xmm0, %eax
+; CHECK-NEXT:    pextrw $2, %xmm0, %eax
+; CHECK-NEXT:    andb $95, %al
----------------
X86ISelLowering's combineExtractWithShuffle is supposed to handle this.....


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55722/new/

https://reviews.llvm.org/D55722





More information about the llvm-commits mailing list