1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=newgvn -S %s | FileCheck %s
4 ; TODO: NewGVN currently miscomiles the function below. PR36335.
8 define void @main(i1 %c1, i1 %c2, i32 %x) {
11 ; CHECK-NEXT: br i1 [[C1:%.*]], label [[L:%.*]], label [[END:%.*]]
13 ; CHECK-NEXT: [[XOR:%.*]] = xor i32 [[X:%.*]], -1
14 ; CHECK-NEXT: call void @foo(i32 [[XOR]])
15 ; CHECK-NEXT: br label [[L]]
17 ; CHECK-NEXT: ret void
20 br i1 %c1, label %L, label %end
23 %d.1 = phi i8 [ undef, %entry ], [ -1, %L ]
24 %conv = sext i8 %d.1 to i32
25 %xor = xor i32 %x, %conv
26 %neg = xor i32 %xor, -1
27 call void @foo(i32 %neg)