aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorHussam A. <60274772+hussam-alhassan@users.noreply.github.com>2026-01-08 18:02:34 +0000
committerGitHub <noreply@github.com>2026-01-08 18:02:34 +0000
commit4f7da2f1363d7e7dcabba13965621a70e32d246d (patch)
treea071104d93755bb6172947013326027781cf8f2c /lldb/test/Shell/ScriptInterpreter/Python
parentf8b68c7b74704892ce308049fbc045e4b8b30d4d (diff)
downloadllvm-4f7da2f1363d7e7dcabba13965621a70e32d246d.zip
llvm-4f7da2f1363d7e7dcabba13965621a70e32d246d.tar.gz
llvm-4f7da2f1363d7e7dcabba13965621a70e32d246d.tar.bz2
[AArch64] Add intra-block CSINC optimization to AArch64ConditionOptimizer (#173734)
This patch extends the AArch64ConditionOptimizer pass to handle CSINC instructions within a single basic block, complementing the existing cross-block branch optimization. The optimization finds two CMP+CSINC pairs comparing the same register with immediates differing by 1, and adjusts one comparison to enable CSE to eliminate the redundant CMP instruction. Example transformation: ``` cmp w8, #10 csinc w9, w0, w1, gt ; w9 = (w8 > 10) ? w0 : w1+1 cmp w8, #9 ; Removed by CSE after adjustment csinc w10, w0, w1, gt ; w10 = (w8 > 9) ? w0 : w1+1 ``` After optimization: ``` cmp w8, #10 csinc w9, w0, w1, gt ; w9 = (w8 > 10) ? w0 : w1+1 csinc w10, w0, w1, ge ; w10 = (w8 >= 10) ? w0 : w1+1 ``` The existing cross-block logic has also been extracted into its own method. Any feedback on code quality and better practices is highly welcome. Co-authored-by: Hussam Alhassan <hsm.link@proton.me>
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions