summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-14 12:51:06 +0000
committerTim Northover <tnorthover@apple.com>2014-04-14 12:51:06 +0000
commite90d4e2c6938686cc72f805dd887cc5ae892909b (patch)
tree38bc8c0afe70549a927e5ea7a3a0d4705ab8635e /test/CodeGen
parent97c1fc08324c2bed43cd1200f76aabc24b3ffe2e (diff)
downloadllvm-e90d4e2c6938686cc72f805dd887cc5ae892909b.tar.gz
llvm-e90d4e2c6938686cc72f805dd887cc5ae892909b.tar.bz2
llvm-e90d4e2c6938686cc72f805dd887cc5ae892909b.tar.xz
AArch64/ARM64: enable directcond.ll test on ARM64.
Code change is because optimizeCompareInstr didn't know how to pull the condition code out of FCSEL instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/AArch64/directcond.ll23
1 files changed, 14 insertions, 9 deletions
diff --git a/test/CodeGen/AArch64/directcond.ll b/test/CodeGen/AArch64/directcond.ll
index 12c7b6aed6..12d38cf091 100644
--- a/test/CodeGen/AArch64/directcond.ll
+++ b/test/CodeGen/AArch64/directcond.ll
@@ -1,11 +1,13 @@
-; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
+; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64
+; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s
define i32 @test_select_i32(i1 %bit, i32 %a, i32 %b) {
; CHECK-LABEL: test_select_i32:
%val = select i1 %bit, i32 %a, i32 %b
-; CHECK: movz [[ONE:w[0-9]+]], #1
-; CHECK: tst w0, [[ONE]]
+; CHECK-AARCH64: movz [[ONE:w[0-9]+]], #1
+; CHECK-AARCH64: tst w0, [[ONE]]
+; CHECK-ARM64: tst w0, #0x1
; CHECK-NEXT: csel w0, w1, w2, ne
ret i32 %val
@@ -14,8 +16,9 @@ define i32 @test_select_i32(i1 %bit, i32 %a, i32 %b) {
define i64 @test_select_i64(i1 %bit, i64 %a, i64 %b) {
; CHECK-LABEL: test_select_i64:
%val = select i1 %bit, i64 %a, i64 %b
-; CHECK: movz [[ONE:w[0-9]+]], #1
-; CHECK: tst w0, [[ONE]]
+; CHECK-AARCH64: movz [[ONE:w[0-9]+]], #1
+; CHECK-AARCH64: tst w0, [[ONE]]
+; CHECK-ARM64: tst w0, #0x1
; CHECK-NEXT: csel x0, x1, x2, ne
ret i64 %val
@@ -24,8 +27,9 @@ define i64 @test_select_i64(i1 %bit, i64 %a, i64 %b) {
define float @test_select_float(i1 %bit, float %a, float %b) {
; CHECK-LABEL: test_select_float:
%val = select i1 %bit, float %a, float %b
-; CHECK: movz [[ONE:w[0-9]+]], #1
-; CHECK: tst w0, [[ONE]]
+; CHECK-AARCH64: movz [[ONE:w[0-9]+]], #1
+; CHECK-AARCH64: tst w0, [[ONE]]
+; CHECK-ARM64: tst w0, #0x1
; CHECK-NEXT: fcsel s0, s0, s1, ne
; CHECK-NOFP-NOT: fcsel
ret float %val
@@ -34,8 +38,9 @@ define float @test_select_float(i1 %bit, float %a, float %b) {
define double @test_select_double(i1 %bit, double %a, double %b) {
; CHECK-LABEL: test_select_double:
%val = select i1 %bit, double %a, double %b
-; CHECK: movz [[ONE:w[0-9]+]], #1
-; CHECK: tst w0, [[ONE]]
+; CHECK-AARCH64: movz [[ONE:w[0-9]+]], #1
+; CHECK-AARCH64: tst w0, [[ONE]]
+; CHECK-ARM64: tst w0, #0x1
; CHECK-NEXT: fcsel d0, d0, d1, ne
; CHECK-NOFP-NOT: fcsel