1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -S -newgvn %s | FileCheck %s 3 4%struct.anon = type { i32 } 5@b = external global %struct.anon 6define 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:%.*]] 10; CHECK: if.then: 11; CHECK-NEXT: br label [[L:%.*]] 12; CHECK: L: 13; CHECK-NEXT: br label [[IF_END]] 14; CHECK: 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:%.*]] 22; CHECK: lor.end: 23; CHECK-NEXT: br label [[L]] 24; 25 store i32 8, i32* null 26 br i1 %patatino, label %if.end, label %if.then 27if.then: 28 store i32 8, i32* null 29 br label %L 30L: 31 br label %if.end 32if.end: 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) 39 br label %lor.end 40lor.end: 41 %bf.load4 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @b, i64 0, i32 0) 42 %tmp4 = and i32 %bf.load4, 536870911 43 %or = or i32 0, %tmp4 44 br label %L 45} 46