1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

ARM: take account of possible bundle when erasing an instruction.

Fortunately this appears to be the only ARM-specific pass that runs while
bundles might be in play, so no other cases need modifying.

llvm-svn: 273029
This commit is contained in:
Tim Northover 2016-06-17 18:40:46 +00:00
parent 3ddcd8385f
commit c278e02311
2 changed files with 17 additions and 1 deletions

View File

@ -461,7 +461,7 @@ Thumb2SizeReduce::ReduceLoadStore(MachineBasicBlock &MBB, MachineInstr *MI,
MIB.setMIFlags(MI->getFlags());
// Kill the old instruction.
MI->eraseFromParent();
MI->eraseFromBundle();
++NumLdSts;
return true;
}

View File

@ -82,3 +82,19 @@ entry:
%shr = lshr i32 %a, %b
ret i32 %shr
}
define i32 @bundled_instruction(i32* %addr, i32** %addr2, i1 %tst) minsize {
; CHECK-LABEL: bundled_instruction:
; CHECK: iteee ne
; CHECK: ldmeq r0!, {{{r[0-9]+}}}
br i1 %tst, label %true, label %false
true:
ret i32 0
false:
%res = load i32, i32* %addr, align 4
%next = getelementptr i32, i32* %addr, i32 1
store i32* %next, i32** %addr2
ret i32 %res
}