2016-08-04 02:17:35 +08:00
|
|
|
; RUN: llc -verify-machineinstrs -mtriple="powerpc-unknown-linux-gnu" < %s | FileCheck %s --check-prefix=PPC32
|
|
|
|
; RUN: llc -verify-machineinstrs -mtriple="powerpc64-unknown-linux-gnu" < %s | FileCheck %s --check-prefix=PPC64
|
2013-02-27 05:28:57 +08:00
|
|
|
; PR15332
|
|
|
|
|
2016-04-07 23:30:55 +08:00
|
|
|
define i32 @regalloc() nounwind {
|
2013-02-27 05:28:57 +08:00
|
|
|
entry:
|
2016-04-07 23:30:55 +08:00
|
|
|
%0 = add i32 1, 2
|
|
|
|
ret i32 %0
|
2013-02-27 05:28:57 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC32-LABEL: regalloc:
|
2013-02-27 05:28:57 +08:00
|
|
|
; PPC32-NOT: stwu 1, -{{[0-9]+}}(1)
|
|
|
|
; PPC32: blr
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC64-LABEL: regalloc:
|
2013-02-27 05:28:57 +08:00
|
|
|
; PPC64-NOT: stdu 1, -{{[0-9]+}}(1)
|
|
|
|
; PPC64: blr
|
|
|
|
|
2016-04-07 23:30:55 +08:00
|
|
|
define i8* @smallstack() nounwind {
|
2013-02-27 05:28:57 +08:00
|
|
|
entry:
|
2016-04-07 23:30:55 +08:00
|
|
|
%0 = alloca i8, i32 4
|
|
|
|
ret i8* %0
|
2013-02-27 05:28:57 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC32-LABEL: smallstack:
|
2013-02-27 05:28:57 +08:00
|
|
|
; PPC32: stwu 1, -16(1)
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC64-LABEL: smallstack:
|
2013-02-27 05:28:57 +08:00
|
|
|
; PPC64-NOT: stdu 1, -{{[0-9]+}}(1)
|
|
|
|
; PPC64: blr
|
|
|
|
|
2016-04-07 23:30:55 +08:00
|
|
|
define i8* @bigstack() nounwind {
|
2013-02-27 05:28:57 +08:00
|
|
|
entry:
|
2016-04-07 23:30:55 +08:00
|
|
|
%0 = alloca i8, i32 230
|
|
|
|
ret i8* %0
|
2013-02-27 05:28:57 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC32-LABEL: bigstack:
|
2013-02-27 05:28:57 +08:00
|
|
|
; PPC32: stwu 1, -240(1)
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; PPC64-LABEL: bigstack:
|
2014-06-23 21:47:52 +08:00
|
|
|
; PPC64: stdu 1, -288(1)
|