[PATCH] D12731: [InstCombine] CVTPH2PS Vector Demanded Elements + Constant Folding

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 11:50:10 PDT 2015


ab accepted this revision.
ab added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:846-857
@@ -799,13 +845,14 @@
+
   case Intrinsic::x86_sse_storeu_ps:
   case Intrinsic::x86_sse2_storeu_pd:
   case Intrinsic::x86_sse2_storeu_dq:
     // Turn X86 storeu -> store if the pointer is known aligned.
     if (getOrEnforceKnownAlignment(II->getArgOperand(0), 16, DL, II, AC, DT) >=
         16) {
       Type *OpPtrTy =
         PointerType::getUnqual(II->getArgOperand(1)->getType());
       Value *Ptr = Builder->CreateBitCast(II->getArgOperand(0), OpPtrTy);
       return new StoreInst(II->getArgOperand(1), Ptr);
     }
     break;
 
----------------
I couldn't help but notice that this is very similar to the ppc case above.  All else being equal, can you keep them together?

Plus, the ph2ps case is similar to ss2si below!

================
Comment at: test/Transforms/InstCombine/x86-f16c.ll:3-4
@@ +2,4 @@
+
+declare <4 x float> @llvm.x86.vcvtph2ps.128(<8 x i16>) nounwind readonly
+declare <8 x float> @llvm.x86.vcvtph2ps.256(<8 x i16>) nounwind readonly
+
----------------
Unnecessary attributes?


Repository:
  rL LLVM

http://reviews.llvm.org/D12731





More information about the llvm-commits mailing list