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