mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-07 12:30:44 +00:00
3c0f002a59
An example from Hexagon where things went wrong: %R0<def> = L2_loadrigp <ga:@fp04> ; load function address J2_callr %R0<kill>, ..., %R0<imp-def> ; call *R0, return value in R0 ScheduleDAGInstrs::buildSchedGraph would visit all instructions going backwards, and in each instruction it would visit all operands in their order on the operand list. In the case of this call, it visited the use of R0 first, then removed it from the set Uses after it visited the def. This caused the DAG to be missing the data dependence edge on R0 between the load and the call. Differential Revision: http://reviews.llvm.org/D20102 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269076 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
456 B
LLVM
21 lines
456 B
LLVM
; RUN: llc -march=hexagon < %s | FileCheck %s
|
|
; Check that the callr and the load into r0 are not packetized together.
|
|
|
|
target triple = "hexagon"
|
|
|
|
@fp = common global i32 (...)* null, align 4
|
|
|
|
; CHECK: r0 = memw
|
|
; CHECK: {
|
|
; CHECK: callr r0
|
|
|
|
; Function Attrs: nounwind
|
|
define i32 @foo() #0 {
|
|
entry:
|
|
%0 = load i32 ()*, i32 ()** bitcast (i32 (...)** @fp to i32 ()**), align 4
|
|
%call = tail call i32 %0() #0
|
|
ret i32 %call
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|