Skip to content

Commit 4ff6226

Browse files
committed
[SLP] Additional test for PR35354, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319224 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 7affb6d commit 4ff6226

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Transforms/InstCombine/load-bitcast-select.ll

+13
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,16 @@ for.body: ; preds = %for.cond
5555
%inc = add nuw nsw i32 %i.0, 1
5656
br label %for.cond
5757
}
58+
59+
define i32 @store_bitcasted_load(i1 %cond, float* dereferenceable(4) %addr1, float* dereferenceable(4) %addr2) {
60+
; CHECK-LABEL: @store_bitcasted_load(
61+
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[COND:%.*]], float* [[ADDR1:%.*]], float* [[ADDR2:%.*]]
62+
; CHECK-NEXT: [[BC1:%.*]] = bitcast float* [[SEL]] to i32*
63+
; CHECK-NEXT: [[LD:%.*]] = load i32, i32* [[BC1]], align 4
64+
; CHECK-NEXT: ret i32 [[LD]]
65+
;
66+
%sel = select i1 %cond, float* %addr1, float* %addr2
67+
%bc1 = bitcast float* %sel to i32*
68+
%ld = load i32, i32* %bc1
69+
ret i32 %ld
70+
}

0 commit comments

Comments
 (0)