1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -instcombine -S < %s | FileCheck %s 3 4define void @PR37526(i32* %pz, i32* %px, i32* %py) { 5; CHECK-LABEL: @PR37526( 6; CHECK-NEXT: [[T1:%.*]] = bitcast i32* [[PZ:%.*]] to i64* 7; CHECK-NEXT: [[T2:%.*]] = load i32, i32* [[PY:%.*]], align 4 8; CHECK-NEXT: [[T3:%.*]] = load i32, i32* [[PX:%.*]], align 4 9; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[T2]], [[T3]] 10; CHECK-NEXT: [[SELECT:%.*]] = select i1 [[CMP]], i32* [[PX]], i32* [[PY]] 11; CHECK-NEXT: [[BC:%.*]] = bitcast i32* [[SELECT]] to i64* 12; CHECK-NEXT: [[R:%.*]] = load i64, i64* [[BC]], align 4 13; CHECK-NEXT: store i64 [[R]], i64* [[T1]], align 4 14; CHECK-NEXT: ret void 15; 16 %t1 = bitcast i32* %pz to i64* 17 %t2 = load i32, i32* %py 18 %t3 = load i32, i32* %px 19 %cmp = icmp slt i32 %t2, %t3 20 %select = select i1 %cmp, i32* %px, i32* %py 21 %bc = bitcast i32* %select to i64* 22 %r = load i64, i64* %bc 23 store i64 %r, i64* %t1 24 ret void 25} 26