1 ; RUN: opt < %s -scalarrepl -S | not grep shr 2 3 ; FIXME: I think this test is no longer valid. 4 ; It was working because SROA was aborting when 5 ; no datalayout was supplied 6 ; XFAIL: * 7 8 9 %struct.S = type { i16 } 10 11 define zeroext i1 @f(i16 signext %b) { 12 entry: 13 %b_addr = alloca i16 ; <i16*> [#uses=2] 14 %retval = alloca i32 ; <i32*> [#uses=2] 15 %s = alloca %struct.S ; <%struct.S*> [#uses=2] 16 %tmp = alloca i32 ; <i32*> [#uses=2] 17 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 18 store i16 %b, i16* %b_addr 19 %tmp1 = getelementptr %struct.S, %struct.S* %s, i32 0, i32 0 ; <i16*> [#uses=1] 20 %tmp2 = load i16, i16* %b_addr, align 2 ; <i16> [#uses=1] 21 store i16 %tmp2, i16* %tmp1, align 2 22 %tmp3 = getelementptr %struct.S, %struct.S* %s, i32 0, i32 0 ; <i16*> [#uses=1] 23 %tmp34 = bitcast i16* %tmp3 to [2 x i1]* ; <[2 x i1]*> [#uses=1] 24 %tmp5 = getelementptr [2 x i1], [2 x i1]* %tmp34, i32 0, i32 1 ; <i1*> [#uses=1] 25 %tmp6 = load i1, i1* %tmp5, align 1 ; <i1> [#uses=1] 26 %tmp67 = zext i1 %tmp6 to i32 ; <i32> [#uses=1] 27 store i32 %tmp67, i32* %tmp, align 4 28 %tmp8 = load i32, i32* %tmp, align 4 ; <i32> [#uses=1] 29 store i32 %tmp8, i32* %retval, align 4 30 br label %return 31 32 return: ; preds = %entry 33 %retval9 = load i32, i32* %retval ; <i32> [#uses=1] 34 %retval910 = trunc i32 %retval9 to i1 ; <i1> [#uses=1] 35 ret i1 %retval910 36 } 37