[WinEH] Add some test cases I forgot to add to previous commits
[oota-llvm.git] / test / CodeGen / AArch64 / neon-or-combine.ll
1 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s
2
3 ; Check that the DAGCombiner does not crash with an assertion failure
4 ; when performing a target specific combine to simplify a 'or' dag node
5 ; according to the following rule:
6 ;   (or (and B, A), (and C, ~A)) => (VBSL A, B, C)
7 ; The assertion failure was caused by an invalid comparison between APInt
8 ; values with different 'BitWidth'.
9
10 define <8 x i8> @test1(<8 x i8> %a, <8 x i8> %b)  {
11   %tmp1 = and <8 x i8> %a, < i8 -1, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 0, i8 0 >
12   %tmp2 = and <8 x i8> %b, < i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0 >
13   %tmp3 = or <8 x i8> %tmp1, %tmp2
14   ret <8 x i8> %tmp3
15 }
16
17 ; CHECK-LABEL: test1
18 ; CHECK: ret
19
20 define <16 x i8> @test2(<16 x i8> %a, <16 x i8> %b) {
21   %tmp1 = and <16 x i8> %a, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 >
22   %tmp2 = and <16 x i8> %b, < i8 -1, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0 >
23   %tmp3 = or <16 x i8> %tmp1, %tmp2
24   ret <16 x i8> %tmp3
25 }
26
27 ; CHECK-LABEL: test2
28 ; CHECK: ret
29