mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 10:32:56 +00:00
Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d02be24cad
commit
cc5bd4a561
@ -182,6 +182,9 @@ bool Filler::delayHasHazard(MachineBasicBlock::iterator candidate,
|
||||
SmallSet<unsigned, 32> &RegUses)
|
||||
{
|
||||
|
||||
if (candidate->isImplicitDef() || candidate->isKill())
|
||||
return true;
|
||||
|
||||
if (candidate->getDesc().mayLoad()) {
|
||||
sawLoad = true;
|
||||
if (sawStore)
|
||||
|
@ -1,4 +1,5 @@
|
||||
;RUN: llc -march=sparc < %s | FileCheck %s
|
||||
;RUN: llc -march=sparc -O0 < %s | FileCheck %s -check-prefix=UNOPT
|
||||
|
||||
|
||||
define i32 @test(i32 %a) nounwind {
|
||||
@ -75,3 +76,15 @@ bb1: ; preds = %entry
|
||||
declare i32 @foo(...)
|
||||
|
||||
declare i32 @bar(i32)
|
||||
|
||||
|
||||
define i32 @test_implicit_def() nounwind {
|
||||
entry:
|
||||
;UNOPT: test_implicit_def
|
||||
;UNOPT: call func
|
||||
;UNOPT-NEXT: nop
|
||||
%0 = tail call i32 @func(i32* undef) nounwind
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare i32 @func(i32*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user