brintos

brintos / llvm-project-archived public Read only

0
0
Text · 682 B · de42428 Raw
29 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=sccp -S | FileCheck %s3 4@A = constant i32 105 6define i712 @test1() {7; CHECK-LABEL: @test1(8; CHECK-NEXT:    [[BB:%.*]] = and i64 ptrtoint (ptr @A to i64), undef9; CHECK-NEXT:    [[C:%.*]] = icmp sge i64 [[BB]], 010; CHECK-NEXT:    [[X:%.*]] = select i1 [[C]], i712 0, i712 111; CHECK-NEXT:    ret i712 [[X]]12;13  %B = ptrtoint ptr @A to i6414  %BB = and i64 %B, undef15  %C = icmp sge i64 %BB, 016  %X = select i1 %C, i712 0, i712 117  ret i712 %X18}19 20 21 22define i712 @test2(i1 %C) {23; CHECK-LABEL: @test2(24; CHECK-NEXT:    ret i712 025;26  %X = select i1 %C, i712 0, i712 undef27  ret i712 %X28}29