[PATCH] D38689: [X86] Fix a bug with i386 subtarget in LowerCONCAT_VECTORSvXi1 func

Uriel Korach via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 03:33:52 PDT 2017


uriel.k updated this revision to Diff 118326.
uriel.k added a comment.

Changed function to be DAG.getIntPtrConstant(0, dl) instead.

Test case is not possible right now as it crashes only after another patch that will add TESTM to 
the list of instructions that zeroing the upper bits by default (much like PCMPEQ).


https://reviews.llvm.org/D38689

Files:
  lib/Target/X86/X86ISelLowering.cpp


Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -8028,7 +8028,7 @@
   // output register, mark it as legal and catch the pattern in instruction
   // selection to avoid emitting extra insturctions (for zeroing upper bits).
   if (SDValue Promoted = isTypePromotionOfi1ZeroUpBits(Op)) {
-    SDValue ZeroC = DAG.getConstant(0, dl, MVT::i64);
+    SDValue ZeroC =  DAG.getIntPtrConstant(0, dl); 
     SDValue AllZeros = DAG.getSplatBuildVector(ResVT, dl, ZeroC);
     return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, AllZeros, Promoted,
                        ZeroC);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38689.118326.patch
Type: text/x-patch
Size: 714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/42eacb36/attachment.bin>


More information about the llvm-commits mailing list