File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2804,7 +2804,7 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
28042804 BitVector WrittenRegs (RegInfo->getNumRegs ());
28052805 const BitVector &SizeRegAliases = getAliases (SizeReg);
28062806
2807- for (auto InstIt = BB. begin () ; InstIt != CallInst; ++ InstIt) {
2807+ for (auto InstIt = CallInst ; InstIt != BB. begin (); -- InstIt) {
28082808 const MCInst &Inst = *InstIt;
28092809 WrittenRegs.reset ();
28102810 getWrittenRegs (Inst, WrittenRegs);
Original file line number Diff line number Diff line change 77# RUN: llvm - bolt %t.exe -- inline - memcpy - o %t.bolt 2 >& 1 | FileCheck %s -- check - prefix=CHECK - INLINE
88# RUN: llvm - objdump - d %t.bolt | FileCheck %s -- check - prefix=CHECK - ASM
99
10- # Verify BOLT reports th at it inlined memcpy calls ( 11 successful inlines out of 16 total calls)
10+ # Verify BOLT reports th at it inlined memcpy calls ( 11 successful inlines out of 17 total calls)
1111# CHECK - INLINE: BOLT - INFO: inlined 11 memcpy() calls
1212
1313# Each function should use optimal size - specific instructions and NO memcpy calls
8484# CHECK - ASM - LABEL: <test_register_move_negative>:
8585# CHECK - ASM: bl {{. * }}<memcpy
8686
87+ # CHECK - ASM - LABEL: <test_x2_rewrite_negative>:
88+ # CHECK - ASM: bl {{. * }}<memcpy
89+
8790# Live - in parameter should NOT be inlined (size unknown at compile time)
8891# CHECK - ASM - LABEL: <test_live_in_negative>:
8992# CHECK - ASM: bl {{. * }}<memcpy
@@ -273,6 +276,15 @@ test_register_move_negative:
273276 ret
274277 .size test_register_move_negative , . - test_register_move_negative
275278
279+ .globl test_x2_rewrite_negative
280+ .type test_x2_rewrite_negative , @function
281+ test_x2_rewrite_negative:
282+ mov x2 , # 8
283+ ldr x2 , [ sp , # 24 ]
284+ bl memcpy
285+ ret
286+ .size test_x2_rewrite_negative , . - test_x2_rewrite_negative
287+
276288 .globl test_live_in_negative
277289 .type test_live_in_negative , @function
278290test_live_in_negative:
You can’t perform that action at this time.
0 commit comments