mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 02:22:31 +00:00
Fix off-by-one error in traversing an array; this fixes a test.
The error was reported by gcc-4.3.0 during compilation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61896 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fdede435b9
commit
93c65c8378
@ -678,7 +678,7 @@ SPUInstrInfo::ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond)
|
||||
|
||||
unsigned Opc = unsigned(Cond[0].getImm());
|
||||
// Pretty dull mapping between the two conditions that SPU can generate:
|
||||
for (int i = sizeof(revconds)/sizeof(revconds[0]); i >= 0; --i) {
|
||||
for (int i = sizeof(revconds)/sizeof(revconds[0]) - 1; i >= 0; --i) {
|
||||
if (revconds[i].Opc == Opc) {
|
||||
Cond[0].setImm(revconds[i].RevCondOpc);
|
||||
return false;
|
||||
|
@ -16,8 +16,6 @@
|
||||
; RUN: grep -w rotqbybi %t1.s | count 1
|
||||
; RUN: grep -w sfi %t1.s | count 3
|
||||
|
||||
; XFAIL: alpha|linux|sparc|ia64|arm
|
||||
|
||||
target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
|
||||
target triple = "spu"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user