[MIPS GlobalISel] Select MSA vector generic and builtin add
[llvm-core.git] / test / CodeGen / AArch64 / eon.ll
blob29c4c8ffd2038cd8c9b86a36e4b0cd1d3cab99fc
1 ; RUN: llc -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s
2 ; RUN: llc %s -pass-remarks-missed=gisel* -mtriple=aarch64-none-linux-gnu -global-isel -o - 2>&1 | FileCheck %s
4 ; CHECK-NOT: remark
6 ; Check that the eon instruction is generated instead of eor,movn
7 define i64 @test1(i64 %a, i64 %b, i64 %c) {
8 ; CHECK-LABEL: test1:
9 ; CHECK: eon
10 ; CHECK: ret
11 entry:
12   %shl = shl i64 %b, 4
13   %neg = xor i64 %a, -1
14   %xor = xor i64 %shl, %neg
15   ret i64 %xor
18 ; Same check with mutliple uses of %neg
19 define i64 @test2(i64 %a, i64 %b, i64 %c) {
20 ; CHECK-LABEL: test2:
21 ; CHECK: eon
22 ; CHECK: eon
23 ; CHECK: lsl
24 ; CHECK: ret
25 entry:
26   %shl = shl i64 %b, 4
27   %neg = xor i64 %shl, -1
28   %xor = xor i64 %neg, %a
29   %xor1 = xor i64 %c, %neg
30   %shl2 = shl i64 %xor, %xor1
31   ret i64 %shl2