mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
cc12b285b6
This will currently accept the old number of bytes syntax, and convert it to a scalar. This should be removed in the near future (I think I converted all of the tests already, but likely missed a few). Not sure what the exact syntax and policy should be. We can continue printing the number of bytes for non-generic instructions to avoid test churn and only allow non-scalar types for generic instructions. This will currently print the LLT in parentheses, but accept parsing the existing integers and implicitly converting to scalar. The parentheses are a bit ugly, but the parser logic seems unable to deal without either parentheses or some keyword to indicate the start of a type.
91 lines
4.0 KiB
LLVM
91 lines
4.0 KiB
LLVM
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \
|
|
; RUN: --check-prefix=32SMALL-MIR %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \
|
|
; RUN: --check-prefix=32LARGE-MIR %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
|
|
; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \
|
|
; RUN: --check-prefix=64SMALL-MIR %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
|
|
; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \
|
|
; RUN: --check-prefix=64LARGE-MIR %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
; RUN: -code-model=small < %s | FileCheck --check-prefixes=32SMALL-ASM,SMALL-ASM %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
; RUN: -code-model=large < %s | FileCheck --check-prefixes=32LARGE-ASM,LARGE-ASM %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
|
|
; RUN: -code-model=small < %s | FileCheck --check-prefixes=64SMALL-ASM,SMALL-ASM %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
|
|
; RUN: -code-model=large < %s | FileCheck --check-prefixes=64LARGE-ASM,LARGE-ASM %s
|
|
|
|
define float @test_float() {
|
|
entry:
|
|
ret float 5.500000e+00
|
|
}
|
|
|
|
; 32SMALL-MIR: renamable $r[[REG1:[0-9]+]] = LWZtoc %const.0, $r2 :: (load (s32) from got)
|
|
; 32SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $r[[REG1]] :: (load (s32) from constant-pool)
|
|
|
|
; 32LARGE-MIR: renamable $r[[REG1:[0-9]+]] = ADDIStocHA $r2, %const.0
|
|
; 32LARGE-MIR: renamable $r[[REG2:[0-9]+]] = LWZtocL %const.0, killed renamable $r[[REG1]], implicit $r2 :: (load (s32) from got)
|
|
; 32LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $r[[REG2]] :: (load (s32) from constant-pool)
|
|
|
|
; 64SMALL-MIR: renamable $x[[REG1:[0-9]+]] = LDtocCPT %const.0, $x2 :: (load (s64) from got)
|
|
; 64SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $x[[REG1]] :: (load (s32) from constant-pool)
|
|
|
|
; 64LARGE-MIR: renamable $x[[REG1:[0-9]+]] = ADDIStocHA8 $x2, %const.0
|
|
; 64LARGE-MIR: renamable $x[[REG2:[0-9]+]] = LDtocL %const.0, killed renamable $x[[REG1]], implicit $x2 :: (load (s64) from got)
|
|
; 64LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $x[[REG2]] :: (load (s32) from constant-pool)
|
|
|
|
; 32SMALL-ASM: .csect .rodata[RO],2
|
|
; 32SMALL-ASM: .align 2
|
|
; 32SMALL-ASM: L..CPI0_0:
|
|
; 32SMALL-ASM: .vbyte 4, 0x40b00000
|
|
; 32SMALL-ASM: .test_float:
|
|
; 32SMALL-ASM: lwz [[REG1:[0-9]+]], L..C0(2)
|
|
; 32SMALL-ASM: lfs 1, 0([[REG1]])
|
|
; 32SMALL-ASM: blr
|
|
|
|
; 32LARGE-ASM: .csect .rodata[RO],2
|
|
; 32LARGE-ASM: .align 2
|
|
; 32LARGE-ASM: L..CPI0_0:
|
|
; 32LARGE-ASM: .vbyte 4, 0x40b00000
|
|
; 32LARGE-ASM: .test_float:
|
|
; 32LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)
|
|
; 32LARGE-ASM: lwz [[REG2:[0-9]+]], L..C0@l([[REG1]])
|
|
; 32LARGE-ASM: lfs 1, 0([[REG2]])
|
|
; 32LARGE-ASM: blr
|
|
|
|
; 64SMALL-ASM: .csect .rodata[RO],2
|
|
; 64SMALL-ASM: .align 2
|
|
; 64SMALL-ASM: L..CPI0_0:
|
|
; 64SMALL-ASM: .vbyte 4, 0x40b00000
|
|
; 64SMALL-ASM: .test_float:
|
|
; 64SMALL-ASM: ld [[REG1:[0-9]+]], L..C0(2)
|
|
; 64SMALL-ASM: lfs 1, 0([[REG1]])
|
|
; 64SMALL-ASM: blr
|
|
|
|
; 64LARGE-ASM: .csect .rodata[RO],2
|
|
; 64LARGE-ASM: .align 2
|
|
; 64LARGE-ASM: L..CPI0_0:
|
|
; 64LARGE-ASM: .vbyte 4, 0x40b00000
|
|
; 64LARGE-ASM: .test_float:
|
|
; 64LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)
|
|
; 64LARGE-ASM: ld [[REG2:[0-9]+]], L..C0@l([[REG1]])
|
|
; 64LARGE-ASM: lfs 1, 0([[REG2]])
|
|
; 64LARGE-ASM: blr
|
|
|
|
; SMALL-ASM: .toc
|
|
; SMALL-ASM: .tc L..CPI0_0[TC],L..CPI0_0
|
|
|
|
; LARGE-ASM: .toc
|
|
; LARGE-ASM: .tc L..CPI0_0[TE],L..CPI0_0
|