[llvm] r319224 - [SLP] Additional test for PR35354, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 12:48:24 PST 2017
Author: abataev
Date: Tue Nov 28 12:48:24 2017
New Revision: 319224
URL: http://llvm.org/viewvc/llvm-project?rev=319224&view=rev
Log:
[SLP] Additional test for PR35354, NFC.
Modified:
llvm/trunk/test/Transforms/InstCombine/load-bitcast-select.ll
Modified: llvm/trunk/test/Transforms/InstCombine/load-bitcast-select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/load-bitcast-select.ll?rev=319224&r1=319223&r2=319224&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/load-bitcast-select.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/load-bitcast-select.ll Tue Nov 28 12:48:24 2017
@@ -55,3 +55,16 @@ for.body:
%inc = add nuw nsw i32 %i.0, 1
br label %for.cond
}
+
+define i32 @store_bitcasted_load(i1 %cond, float* dereferenceable(4) %addr1, float* dereferenceable(4) %addr2) {
+; CHECK-LABEL: @store_bitcasted_load(
+; CHECK-NEXT: [[SEL:%.*]] = select i1 [[COND:%.*]], float* [[ADDR1:%.*]], float* [[ADDR2:%.*]]
+; CHECK-NEXT: [[BC1:%.*]] = bitcast float* [[SEL]] to i32*
+; CHECK-NEXT: [[LD:%.*]] = load i32, i32* [[BC1]], align 4
+; CHECK-NEXT: ret i32 [[LD]]
+;
+ %sel = select i1 %cond, float* %addr1, float* %addr2
+ %bc1 = bitcast float* %sel to i32*
+ %ld = load i32, i32* %bc1
+ ret i32 %ld
+}
More information about the llvm-commits
mailing list