diff options
| author | Robert Lytton <robert@xmos.com> | 2013-09-09 10:42:05 +0000 |
|---|---|---|
| committer | Robert Lytton <robert@xmos.com> | 2013-09-09 10:42:05 +0000 |
| commit | 4809ea41e6252ad7be381a01a451fba7e1aa8549 (patch) | |
| tree | 1279f277886c667ac0b664285f3858563fd597d9 | |
| parent | e453888379f8bb605c907ccc29c7098b7a8d7114 (diff) | |
| download | bcm5719-llvm-4809ea41e6252ad7be381a01a451fba7e1aa8549.tar.gz bcm5719-llvm-4809ea41e6252ad7be381a01a451fba7e1aa8549.zip | |
XCore target: change to Sched::Source
This sidesteps a bug in PrescheduleNodesWithMultipleUses() which
does not check if callResources will be affected by the transformation.
llvm-svn: 190299
| -rw-r--r-- | llvm/lib/Target/XCore/XCoreISelLowering.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/XCore/shedulingPreference.ll | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp index 6fc7eef5443..9917ca30833 100644 --- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp @@ -79,7 +79,7 @@ XCoreTargetLowering::XCoreTargetLowering(XCoreTargetMachine &XTM) setStackPointerRegisterToSaveRestore(XCore::SP); - setSchedulingPreference(Sched::RegPressure); + setSchedulingPreference(Sched::Source); // Use i32 for setcc operations results (slt, sgt, ...). setBooleanContents(ZeroOrOneBooleanContent); diff --git a/llvm/test/CodeGen/XCore/shedulingPreference.ll b/llvm/test/CodeGen/XCore/shedulingPreference.ll new file mode 100644 index 00000000000..6c2ac6dce48 --- /dev/null +++ b/llvm/test/CodeGen/XCore/shedulingPreference.ll @@ -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) + |

