[llvm] r330547 - [InstCombine] add vector test with undef elts; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 22 08:59:14 PDT 2018
Author: spatel
Date: Sun Apr 22 08:59:14 2018
New Revision: 330547
URL: http://llvm.org/viewvc/llvm-project?rev=330547&view=rev
Log:
[InstCombine] add vector test with undef elts; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/logical-select.ll
Modified: llvm/trunk/test/Transforms/InstCombine/logical-select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/logical-select.ll?rev=330547&r1=330546&r2=330547&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/logical-select.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/logical-select.ll Sun Apr 22 08:59:14 2018
@@ -479,6 +479,19 @@ define <4 x i32> @vec_not_sel_consts(<4
ret <4 x i32> %or
}
+define <4 x i32> @vec_not_sel_consts_undef_elts(<4 x i32> %a, <4 x i32> %b) {
+; CHECK-LABEL: @vec_not_sel_consts_undef_elts(
+; CHECK-NEXT: [[AND1:%.*]] = and <4 x i32> [[A:%.*]], <i32 -1, i32 undef, i32 0, i32 0>
+; CHECK-NEXT: [[AND2:%.*]] = and <4 x i32> [[B:%.*]], <i32 0, i32 -1, i32 0, i32 undef>
+; CHECK-NEXT: [[OR:%.*]] = or <4 x i32> [[AND1]], [[AND2]]
+; CHECK-NEXT: ret <4 x i32> [[OR]]
+;
+ %and1 = and <4 x i32> %a, <i32 -1, i32 undef, i32 0, i32 0>
+ %and2 = and <4 x i32> %b, <i32 0, i32 -1, i32 0, i32 undef>
+ %or = or <4 x i32> %and1, %and2
+ ret <4 x i32> %or
+}
+
; The inverted constants may be operands of xor instructions.
define <4 x i32> @vec_sel_xor(<4 x i32> %a, <4 x i32> %b, <4 x i1> %c) {
More information about the llvm-commits
mailing list