mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
42052632ff
Relands commit 433c8d950cb3a1fa0977355ce0367e8c763a3f13 with fixes for MIPS. Similar to D102742, specifying the stack alignment via CodegenOpts means that this flag gets dropped during LTO, unless the command line is re-specified as a plugin opt. Instead, encode this information as a module level attribute so that we don't have to expose this llvm internal flag when linking the Linux kernel with LTO. Looks like external dependencies might need a fix: * https://github.com/llvm-hs/llvm-hs/issues/345 * https://github.com/halide/Halide/issues/6079 Link: https://github.com/ClangBuiltLinux/linux/issues/1377 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D103048
26 lines
965 B
LLVM
26 lines
965 B
LLVM
; RUN: split-file %s %t
|
|
; RUN: cat %t/main.ll %t/_32.ll > %t/32.ll
|
|
; RUN: llc -march=mipsel < %t/main.ll | FileCheck %s -check-prefix=32
|
|
; RUN: llc -march=mipsel < %t/32.ll | FileCheck %s -check-prefix=A32-32
|
|
; RUN: llc -march=mipsel -mattr=+fp64,+mips32r2 < %t/main.ll | FileCheck %s -check-prefix=32
|
|
; RUN: llc -march=mips64el -mcpu=mips3 < %t/main.ll | FileCheck %s -check-prefix=64
|
|
; RUN: llc -march=mips64el -mcpu=mips4 < %t/main.ll | FileCheck %s -check-prefix=64
|
|
; RUN: llc -march=mips64el -mcpu=mips64 < %t/main.ll | FileCheck %s -check-prefix=64
|
|
; RUN: llc -march=mips64el -mcpu=mips64 < %t/32.ll | FileCheck %s -check-prefix=A32-64
|
|
|
|
;--- main.ll
|
|
; 32: addiu $sp, $sp, -8
|
|
; 64: daddiu $sp, $sp, -16
|
|
; A32-32: addiu $sp, $sp, -32
|
|
; A32-64: daddiu $sp, $sp, -32
|
|
|
|
define i32 @foo1() #0 {
|
|
entry:
|
|
ret i32 14
|
|
}
|
|
|
|
attributes #0 = { "frame-pointer"="all" }
|
|
;--- _32.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"override-stack-alignment", i32 32}
|