summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
diff options
context:
space:
mode:
authorMicah Weston <micahsweston@gmail.com>2022-02-12 03:11:50 +0000
committerBen Shi <ben.shi@streamcomputing.com>2022-02-12 03:13:14 +0000
commitaf45d0fd94b21620b61c8c4900b81486fd85aeb7 (patch)
tree9498b12931e0c063a92979f3e884adbf9603d301 /lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
parent9e975e558ba44b39b55302666957855aa8f009be (diff)
[AArch64] Adds SUBS and ADDS instructions to the MIPeepholeOpt.
Implements ADDS/SUBS 24-bit immediate optimization using the MIPeepholeOpt pass. This follows the pattern: Optimize ([adds|subs] r, imm) -> ([ADDS|SUBS] ([ADD|SUB] r, #imm0, lsl #12), #imm1), if imm == (imm0<<12)+imm1. and both imm0 and imm1 are non-zero 12-bit unsigned integers. Optimize ([adds|subs] r, imm) -> ([SUBS|ADDS] ([SUB|ADD] r, #imm0, lsl #12), #imm1), if imm == -(imm0<<12)-imm1, and both imm0 and imm1 are non-zero 12-bit unsigned integers. The SplitAndOpcFunc type had to change the return type to an Opcode pair so that the first add/sub is the regular instruction and the second is the flag setting instruction. This required updating the code in the AND case. Testing: I ran a two stage bootstrap with this code. Using the second stage compiler, I verified that the negation of an ADDS to SUBS or vice versa is a valid optimization. Example V == -0x111111. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D118663
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py')
0 files changed, 0 insertions, 0 deletions