llvm.org GIT mirror llvm / 86df062
Revert "SCEV: When expanding a GEP the final addition to the base pointer has NUW but not NSW." This isn't right either, reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154910 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 7 years ago
3 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
31863186
31873187 // Add the total offset from all the GEP indices to the base.
31883188 return getAddExpr(BaseS, TotalOffset,
3189 isInBounds ? SCEV::FlagNUW : SCEV::FlagAnyWrap);
3189 isInBounds ? SCEV::FlagNSW : SCEV::FlagAnyWrap);
31903190 }
31913191
31923192 /// GetMinTrailingZeros - Determine the minimum number of zero bits that S is
2222 %1 = sext i32 %i.01 to i64 ; [#uses=1]
2323
2424 ; CHECK: %2 = getelementptr inbounds double* %d, i64 %1
25 ; CHECK: --> {%d,+,16}uw><%bb>
25 ; CHECK: --> {%d,+,16}sw><%bb>
2626 %2 = getelementptr inbounds double* %d, i64 %1 ; [#uses=1]
2727
2828 %3 = load double* %2, align 8 ; [#uses=1]
3636 %8 = sext i32 %7 to i64 ; [#uses=1]
3737
3838 ; CHECK: %9 = getelementptr inbounds double* %q, i64 %8
39 ; CHECK: {(8 + %q),+,16}uw><%bb>
39 ; CHECK: {(8 + %q),+,16}sw><%bb>
4040 %9 = getelementptr inbounds double* %q, i64 %8 ; [#uses=1]
4141
4242 ; Artificially repeat the above three instructions, this time using
4848 %t8 = sext i32 %t7 to i64 ; [#uses=1]
4949
5050 ; CHECK: %t9 = getelementptr inbounds double* %q, i64 %t8
51 ; CHECK: {(8 + %q),+,16}uw><%bb>
51 ; CHECK: {(8 + %q),+,16}sw><%bb>
5252 %t9 = getelementptr inbounds double* %q, i64 %t8 ; [#uses=1]
5353
5454 %10 = load double* %9, align 8 ; [#uses=1]
9191 ; CHECK: {1,+,1}<%for.body.i.i>
9292 %ptrincdec.i.i = getelementptr inbounds i32* %begin, i64 %tmp
9393 ; CHECK: %ptrincdec.i.i =
94 ; CHECK: {(4 + %begin),+,4}uw><%for.body.i.i>
94 ; CHECK: {(4 + %begin),+,4}sw><%for.body.i.i>
9595 %__first.addr.08.i.i = getelementptr inbounds i32* %begin, i64 %indvar.i.i
9696 ; CHECK: %__first.addr.08.i.i
97 ; CHECK: {%begin,+,4}uw><%for.body.i.i>
97 ; CHECK: {%begin,+,4}sw><%for.body.i.i>
9898 store i32 0, i32* %__first.addr.08.i.i, align 4
9999 %cmp.i.i = icmp eq i32* %ptrincdec.i.i, %end
100100 br i1 %cmp.i.i, label %_ZSt4fillIPiiEvT_S1_RKT0_.exit, label %for.body.i.i