1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -newgvn %s | FileCheck %s
4 %struct.anon = type { i32 }
5 @b = external global %struct.anon
6 define void @tinkywinky(i1 %patatino) {
7 ; CHECK-LABEL: @tinkywinky(
8 ; CHECK-NEXT: store i32 8, i32* null
9 ; CHECK-NEXT: br i1 [[PATATINO:%.*]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
11 ; CHECK-NEXT: br label [[L:%.*]]
13 ; CHECK-NEXT: br label [[IF_END]]
15 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* null
16 ; CHECK-NEXT: [[BF_LOAD1:%.*]] = load i32, i32* getelementptr inbounds (%struct.anon, %struct.anon* @b, i64 0, i32 0)
17 ; CHECK-NEXT: [[BF_VALUE:%.*]] = and i32 [[TMP1]], 536870911
18 ; CHECK-NEXT: [[BF_CLEAR:%.*]] = and i32 [[BF_LOAD1]], -536870912
19 ; CHECK-NEXT: [[BF_SET:%.*]] = or i32 [[BF_CLEAR]], [[BF_VALUE]]
20 ; CHECK-NEXT: store i32 [[BF_SET]], i32* getelementptr inbounds (%struct.anon, %struct.anon* @b, i64 0, i32 0)
21 ; CHECK-NEXT: br label [[LOR_END:%.*]]
23 ; CHECK-NEXT: br label [[L]]
25 store i32 8, i32* null
26 br i1 %patatino, label %if.end, label %if.then
28 store i32 8, i32* null
33 %tmp1 = load i32, i32* null
34 %bf.load1 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @b, i64 0, i32 0)
35 %bf.value = and i32 %tmp1, 536870911
36 %bf.clear = and i32 %bf.load1, -536870912
37 %bf.set = or i32 %bf.clear, %bf.value
38 store i32 %bf.set, i32* getelementptr (%struct.anon, %struct.anon* @b, i64 0, i32 0)
41 %bf.load4 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @b, i64 0, i32 0)
42 %tmp4 = and i32 %bf.load4, 536870911