mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
be34c35f32
This new version is much more aggressive about doing "full" reduction in cases where it reduces register pressure, and also more aggressive about rewriting induction variables to count down (or up) to zero when doing so reduces register pressure. It currently uses fairly simplistic algorithms for finding reuse opportunities, but it introduces a new framework allows it to combine multiple strategies at once to form hybrid solutions, instead of doing all full-reduction or all base+index. llvm-svn: 94061
34 lines
594 B
LLVM
34 lines
594 B
LLVM
; RUN: llc < %s -march=x86-64 | FileCheck %s
|
|
|
|
; CodeGen should remat the zero instead of spilling it.
|
|
|
|
declare void @foo(i64 %p)
|
|
|
|
; CHECK: bar:
|
|
; CHECK: xorl %edi, %edi
|
|
; CHECK: xorl %edi, %edi
|
|
define void @bar() nounwind {
|
|
call void @foo(i64 0)
|
|
call void @foo(i64 0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK: bat:
|
|
; CHECK: movq $-1, %rdi
|
|
; CHECK: movq $-1, %rdi
|
|
define void @bat() nounwind {
|
|
call void @foo(i64 -1)
|
|
call void @foo(i64 -1)
|
|
ret void
|
|
}
|
|
|
|
; CHECK: bau:
|
|
; CHECK: movl $1, %edi
|
|
; CHECK: movl $1, %edi
|
|
define void @bau() nounwind {
|
|
call void @foo(i64 1)
|
|
call void @foo(i64 1)
|
|
ret void
|
|
}
|
|
|