[llvm] r190299 - XCore target: change to Sched::Source
Robert Lytton
robert at xmos.com
Mon Sep 9 03:42:05 PDT 2013
Author: rlytton
Date: Mon Sep 9 05:42:05 2013
New Revision: 190299
URL: http://llvm.org/viewvc/llvm-project?rev=190299&view=rev
Log:
XCore target: change to Sched::Source
This sidesteps a bug in PrescheduleNodesWithMultipleUses() which
does not check if callResources will be affected by the transformation.
Added:
llvm/trunk/test/CodeGen/XCore/shedulingPreference.ll
Modified:
llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp
Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=190299&r1=190298&r2=190299&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Mon Sep 9 05:42:05 2013
@@ -79,7 +79,7 @@ XCoreTargetLowering::XCoreTargetLowering
setStackPointerRegisterToSaveRestore(XCore::SP);
- setSchedulingPreference(Sched::RegPressure);
+ setSchedulingPreference(Sched::Source);
// Use i32 for setcc operations results (slt, sgt, ...).
setBooleanContents(ZeroOrOneBooleanContent);
Added: llvm/trunk/test/CodeGen/XCore/shedulingPreference.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/shedulingPreference.ll?rev=190299&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/shedulingPreference.ll (added)
+++ llvm/trunk/test/CodeGen/XCore/shedulingPreference.ll Mon Sep 9 05:42:05 2013
@@ -0,0 +1,25 @@
+; RUN: llc < %s -march=xcore
+
+define void @f( ) {
+entry:
+
+ switch i32 undef, label %default [
+ i32 0, label %start
+ ]
+
+start:
+ br label %end
+
+default:
+ %arg = fadd double undef, undef
+ %res = call double @f2(i32 undef, double %arg, double undef)
+ br label %end
+
+end:
+ %unused = phi double [ %res, %default ], [ undef, %start ]
+
+ unreachable
+}
+
+declare double @f2(i32, double, double)
+
More information about the llvm-commits
mailing list