diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-19 21:47:13 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-19 21:47:13 +0000 |
| commit | 86c5469d2675da06ee340f2f55d014ad1c652e16 (patch) | |
| tree | 02e3ef07b6b4fd4b9e37f96fc67e9a53f3ceb9b8 /llvm/test | |
| parent | 92ebf1153ec157e8ad2d82d3600650bc9ee4194a (diff) | |
| download | bcm5719-llvm-86c5469d2675da06ee340f2f55d014ad1c652e16.tar.gz bcm5719-llvm-86c5469d2675da06ee340f2f55d014ad1c652e16.zip | |
Don't use %g0 to materialize 0 directly.
The wired physreg doesn't work on tied operands like on MOVXCC.
Add a README note to fix this later.
llvm-svn: 182225
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/SPARC/64bit.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SPARC/64cond.ll | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/SPARC/64bit.ll b/llvm/test/CodeGen/SPARC/64bit.ll index 37dcea9891d..dd6cee30b15 100644 --- a/llvm/test/CodeGen/SPARC/64bit.ll +++ b/llvm/test/CodeGen/SPARC/64bit.ll @@ -26,7 +26,7 @@ define i64 @sra_reg(i64 %a, i64 %b) { ; restore %g0, %g0, %o0 ; ; CHECK: ret_imm0 -; CHECK: or %g0, %g0, %i0 +; CHECK: or %g0, 0, %i0 define i64 @ret_imm0() { ret i64 0 } diff --git a/llvm/test/CodeGen/SPARC/64cond.ll b/llvm/test/CodeGen/SPARC/64cond.ll index 0c025b36e3b..594eff6f554 100644 --- a/llvm/test/CodeGen/SPARC/64cond.ll +++ b/llvm/test/CodeGen/SPARC/64cond.ll @@ -98,3 +98,14 @@ entry: %rv = select i1 %tobool, double %a, double %b ret double %rv } + +; The MOVXCC instruction can't use %g0 for its tied operand. +; CHECK: select_consti64_xcc +; CHECK: subcc +; CHECK: movg %xcc, 123, %i0 +define i64 @select_consti64_xcc(i64 %x, i64 %y) { +entry: + %tobool = icmp sgt i64 %x, %y + %rv = select i1 %tobool, i64 123, i64 0 + ret i64 %rv +} |

