brintos

brintos / llvm-project-archived public Read only

0
0
Text · 639 B · 2aba273 Raw
22 lines · plain
1; RUN: opt < %s -S -passes=instcombine | FileCheck %s2; rdar://problem/92679703; ideally this test will run on a 32-bit host4; must not discard GEPs that might overflow at runtime (aren't inbounds)5 6define i32 @main(i32 %argc) {7entry:8    %tmp1 = add i32 %argc, -29    %tmp2 = add i32 %argc, 187904819210    %p = alloca i811; CHECK: getelementptr12    %p1 = getelementptr i8, ptr %p, i32 %tmp113; CHECK: getelementptr14    %p2 = getelementptr i8, ptr %p, i32 %tmp215    %cmp = icmp ult ptr %p1, %p216    br i1 %cmp, label %bbtrue, label %bbfalse17bbtrue:          ; preds = %entry18    ret i32 -119bbfalse:         ; preds = %entry20    ret i32 021}22