[PATCH] D124016: [InstCombine] Pre-commit test for D124015

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:30:15 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon, lebedev.ri.
Herald added a subscriber: StephenFan.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124016

Files:
  llvm/test/Transforms/InstCombine/bitcast.ll


Index: llvm/test/Transforms/InstCombine/bitcast.ll
===================================================================
--- llvm/test/Transforms/InstCombine/bitcast.ll
+++ llvm/test/Transforms/InstCombine/bitcast.ll
@@ -431,6 +431,20 @@
   ret <2 x float> %tmp35
 }
 
+; FIXME: This test should not be optimized by OptimizeIntegerToVectorInsertions.
+; The bitcast from vector is confusing it.
+define <2 x i64> @int2vec_insertion_bitcast_from_vec(i64 %x) {
+; CHECK-LABEL: @int2vec_insertion_bitcast_from_vec(
+; CHECK-NEXT:    [[TMP1:%.*]] = insertelement <2 x i64> <i64 poison, i64 0>, i64 [[X:%.*]], i64 0
+; CHECK-NEXT:    ret <2 x i64> [[TMP1]]
+;
+  %a = bitcast i64 %x to <8 x i8>
+  %b = zext <8 x i8> %a to <8 x i16>
+  %c = bitcast <8 x i16> %b to i128
+  %d = bitcast i128 %c to <2 x i64>
+  ret <2 x i64> %d
+}
+
 define i64 @ISPC0(i64 %in) {
 ; CHECK-LABEL: @ISPC0(
 ; CHECK-NEXT:    ret i64 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124016.423667.patch
Type: text/x-patch
Size: 907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220419/cc9f12e3/attachment.bin>


More information about the llvm-commits mailing list