diff options
| author | Derek Schuff <dschuff@google.com> | 2015-09-08 19:47:15 +0000 |
|---|---|---|
| committer | Derek Schuff <dschuff@google.com> | 2015-09-08 19:47:15 +0000 |
| commit | ee4e947e2379360e1d1d242f146dbba22fcf0fed (patch) | |
| tree | d9d2638473e913c3528698d1397cc58471336eb9 /llvm/test/CodeGen | |
| parent | 02e6589bdacc675de99c7996f246ea3c08b2518b (diff) | |
| download | bcm5719-llvm-ee4e947e2379360e1d1d242f146dbba22fcf0fed.tar.gz bcm5719-llvm-ee4e947e2379360e1d1d242f146dbba22fcf0fed.zip | |
x32. Fixes a bug in i8mem_NOREX declaration.
The old implementation assumed LP64 which is broken for x32. Specifically, the
MOVE8rm_NOREX and MOVE8mr_NOREX, when selected, would cause a 'Cannot emit
physreg copy instruction' error message to be reported.
This patch also enable the h-register*ll tests for x32.
Differential Revision: http://reviews.llvm.org/D12336
Patch by João Porto
llvm-svn: 247058
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/h-register-store.ll | 25 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/h-registers-0.ll | 1 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/h-registers-1.ll | 1 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/h-registers-3.ll | 1 |
4 files changed, 20 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/h-register-store.ll b/llvm/test/CodeGen/X86/h-register-store.ll index 0adb2b148c3..0e6a0236d2c 100644 --- a/llvm/test/CodeGen/X86/h-register-store.ll +++ b/llvm/test/CodeGen/X86/h-register-store.ll @@ -7,6 +7,15 @@ ; X64-NEXT: movb %ah, (%rsi) ; X64-NOT: mov +; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s -check-prefix=X32 +; X32: mov +; X32-NEXT: movb %ah, (%esi) +; X32: mov +; X32-NEXT: movb %ah, (%esi) +; X32: mov +; X32-NEXT: movb %ah, (%esi) +; X32-NOT: mov + ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=W64 ; W64-NOT: mov ; W64: movb %ch, (%rdx) @@ -16,14 +25,14 @@ ; W64: movb %ch, (%rdx) ; W64-NOT: mov -; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 -; X32-NOT: mov -; X32: movb %ah, (%e -; X32-NOT: mov -; X32: movb %ah, (%e -; X32-NOT: mov -; X32: movb %ah, (%e -; X32-NOT: mov +; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X86 +; X86-NOT: mov +; X86: movb %ah, (%e +; X86-NOT: mov +; X86: movb %ah, (%e +; X86-NOT: mov +; X86: movb %ah, (%e +; X86-NOT: mov ; Use h-register extract and store. diff --git a/llvm/test/CodeGen/X86/h-registers-0.ll b/llvm/test/CodeGen/X86/h-registers-0.ll index 6a5ccaa1e76..9b72916ea74 100644 --- a/llvm/test/CodeGen/X86/h-registers-0.ll +++ b/llvm/test/CodeGen/X86/h-registers-0.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -mattr=-bmi -mtriple=x86_64-linux | FileCheck %s -check-prefix=X86-64 +; RUN: llc < %s -mattr=-bmi -mtriple=x86_64-linux-gnux32 | FileCheck %s -check-prefix=X86-64 ; RUN: llc < %s -mattr=-bmi -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64 ; RUN: llc < %s -mattr=-bmi -march=x86 | FileCheck %s -check-prefix=X86-32 diff --git a/llvm/test/CodeGen/X86/h-registers-1.ll b/llvm/test/CodeGen/X86/h-registers-1.ll index 7254325a926..469d5517b40 100644 --- a/llvm/test/CodeGen/X86/h-registers-1.ll +++ b/llvm/test/CodeGen/X86/h-registers-1.ll @@ -1,4 +1,5 @@ ; RUN: llc -mattr=-bmi < %s -mtriple=x86_64-linux | FileCheck %s +; RUN: llc -mattr=-bmi < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s ; LLVM creates virtual registers for values live across blocks ; based on the type of the value. Make sure that the extracts diff --git a/llvm/test/CodeGen/X86/h-registers-3.ll b/llvm/test/CodeGen/X86/h-registers-3.ll index 29d0c280c4f..58b02b7df21 100644 --- a/llvm/test/CodeGen/X86/h-registers-3.ll +++ b/llvm/test/CodeGen/X86/h-registers-3.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=x86 | grep mov | count 1 ; RUN: llc < %s -march=x86-64 | grep mov | count 1 +; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | grep mov | count 1 define zeroext i8 @foo() nounwind ssp { entry: |

