diff options
Diffstat (limited to 'test/CodeGen/PowerPC/crsave.ll')
-rw-r--r-- | test/CodeGen/PowerPC/crsave.ll | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/test/CodeGen/PowerPC/crsave.ll b/test/CodeGen/PowerPC/crsave.ll index f1cbc5afa8ac..a9b4b3607830 100644 --- a/test/CodeGen/PowerPC/crsave.ll +++ b/test/CodeGen/PowerPC/crsave.ll @@ -1,9 +1,9 @@ -; RUN: llc -O0 -disable-fp-elim -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s -check-prefix=PPC32 -; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=PPC64 +; RUN: llc -O0 -disable-fp-elim -mtriple=powerpc-unknown-linux-gnu -mcpu=g5 < %s | FileCheck %s -check-prefix=PPC32 +; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mcpu=g5 < %s | FileCheck %s -check-prefix=PPC64 declare void @foo() -define i32 @test_cr2() nounwind { +define i32 @test_cr2() nounwind uwtable { entry: %ret = alloca i32, align 4 %0 = call i32 asm sideeffect "\0A\09mtcr $4\0A\09cmp 2,$2,$1\0A\09mfcr $0", "=r,r,r,r,r,~{cr2}"(i32 1, i32 2, i32 3, i32 0) nounwind @@ -18,14 +18,19 @@ entry: ; PPC32: mfcr 12 ; PPC32-NEXT: stw 12, 24(31) ; PPC32: lwz 12, 24(31) -; PPC32-NEXT: mtcrf 32, 12 +; PPC32-NEXT: mtocrf 32, 12 +; PPC64: .cfi_startproc ; PPC64: mfcr 12 ; PPC64: stw 12, 8(1) ; PPC64: stdu 1, -[[AMT:[0-9]+]](1) +; PPC64: .cfi_def_cfa_offset 128 +; PPC64: .cfi_offset lr, 16 +; PPC64: .cfi_offset cr2, 8 ; PPC64: addi 1, 1, [[AMT]] ; PPC64: lwz 12, 8(1) -; PPC64: mtcrf 32, 12 +; PPC64: mtocrf 32, 12 +; PPC64: .cfi_endproc define i32 @test_cr234() nounwind { entry: @@ -42,16 +47,16 @@ entry: ; PPC32: mfcr 12 ; PPC32-NEXT: stw 12, 24(31) ; PPC32: lwz 12, 24(31) -; PPC32-NEXT: mtcrf 32, 12 -; PPC32-NEXT: mtcrf 16, 12 -; PPC32-NEXT: mtcrf 8, 12 +; PPC32-NEXT: mtocrf 32, 12 +; PPC32-NEXT: mtocrf 16, 12 +; PPC32-NEXT: mtocrf 8, 12 ; PPC64: mfcr 12 ; PPC64: stw 12, 8(1) ; PPC64: stdu 1, -[[AMT:[0-9]+]](1) ; PPC64: addi 1, 1, [[AMT]] ; PPC64: lwz 12, 8(1) -; PPC64: mtcrf 32, 12 -; PPC64: mtcrf 16, 12 -; PPC64: mtcrf 8, 12 +; PPC64: mtocrf 32, 12 +; PPC64: mtocrf 16, 12 +; PPC64: mtocrf 8, 12 |