diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/ARM/fast-isel-mvn.ll | 10 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/subtarget-no-movt.ll | 45 |
2 files changed, 50 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/ARM/fast-isel-mvn.ll b/llvm/test/CodeGen/ARM/fast-isel-mvn.ll index 89b7c05158c..34bb7225854 100644 --- a/llvm/test/CodeGen/ARM/fast-isel-mvn.ll +++ b/llvm/test/CodeGen/ARM/fast-isel-mvn.ll @@ -1,8 +1,8 @@ -; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM -; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM -; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM -; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -arm-use-movt=true -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB -; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -arm-use-movt=true -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=MOVT +; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM +; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM +; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mattr=+no-movt -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM +; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB +; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=MOVT ; rdar://10412592 define void @t1() nounwind { diff --git a/llvm/test/CodeGen/ARM/subtarget-no-movt.ll b/llvm/test/CodeGen/ARM/subtarget-no-movt.ll new file mode 100644 index 00000000000..cb61bde3f9c --- /dev/null +++ b/llvm/test/CodeGen/ARM/subtarget-no-movt.ll @@ -0,0 +1,45 @@ +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-no-movt | FileCheck -check-prefix=USE-MOVT %s +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+no-movt | FileCheck -check-prefix=NO-USE-MOVT %s +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-no-movt | FileCheck -check-prefix=USE-MOVT %s +; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+no-movt | FileCheck -check-prefix=NO-USE-MOVT %s + +; NO-OPTION-LABEL: {{_?}}foo0 +; NO-OPTION: ldr [[R0:r[0-9]+]], [[L0:.*]] +; NO-OPTION: [[L0]]: +; NO-OPTION: .long 2296237089 + +; USE-MOVT-LABEL: {{_?}}foo0 +; USE-MOVT: movw [[R0:r[0-9]+]], #52257 +; USE-MOVT: movt [[R0]], #35037 + +; NO-USE-MOVT-LABEL: {{_?}}foo0 +; NO-USE-MOVT: ldr [[R0:r[0-9]+]], [[L0:.*]] +; NO-USE-MOVT: [[L0]]: +; NO-USE-MOVT: .long 2296237089 + +define i32 @foo0(i32 %a) #0 { + %1 = xor i32 -1998730207, %a + ret i32 %1 +} + +; NO-OPTION-LABEL: {{_?}}foo1 +; NO-OPTION: movw [[R0:r[0-9]+]], #52257 +; NO-OPTION: movt [[R0]], #35037 + +; USE-MOVT-LABEL: {{_?}}foo1 +; USE-MOVT: movw [[R0:r[0-9]+]], #52257 +; USE-MOVT: movt [[R0]], #35037 + +; NO-USE-MOVT-LABEL: {{_?}}foo1 +; NO-USE-MOVT: ldr [[R0:r[0-9]+]], [[L0:.*]] +; NO-USE-MOVT: [[L0]]: +; NO-USE-MOVT: .long 2296237089 + +define i32 @foo1(i32 %a) { + %1 = xor i32 -1998730207, %a + ret i32 %1 +} + +attributes #0 = { "target-features"="+no-movt" } |

