1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=instcombine -S < %s | FileCheck %s
4 define <4 x ptr> @PR41270(ptr %x) {
5 ; CHECK-LABEL: @PR41270(
6 ; CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, ptr [[X:%.*]], i64 6
7 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <4 x ptr> <ptr poison, ptr undef, ptr undef, ptr undef>, ptr [[T3]], i64 0
8 ; CHECK-NEXT: ret <4 x ptr> [[INS2]]
10 %ins = insertelement <4 x ptr> undef, ptr %x, i32 0
11 %splat = shufflevector <4 x ptr> %ins, <4 x ptr> undef, <4 x i32> zeroinitializer
12 %t2 = getelementptr inbounds [4 x i16], <4 x ptr> %splat, i32 0, i32 3
13 %t3 = extractelement <4 x ptr> %t2, i32 3
14 %ins2 = insertelement <4 x ptr> undef, ptr %t3, i32 0