-
Notifications
You must be signed in to change notification settings - Fork 7
pre-commit: PR150420 #2610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pre-commit: PR150420 #2610
Conversation
Diff moderunner: ariselab-64c-docker 2264 files changed, 384115 insertions(+), 387353 deletions(-)
2 4 bench/abc/optimized/cmdUtils.ll |
The provided diff includes numerous changes across various optimized LLVM IR files. After filtering out non-interesting changes (e.g., formatting, comments, reordering), the major changes can be summarized as follows:
These changes collectively aim to simplify the IR, reduce the number of instructions, and improve the efficiency of the generated code, which can lead to better performance in the final executable. model: qwen-plus-latest |
%67 = add nsw i64 %66, -1 | ||
%umax = call i64 @llvm.umax.i64(i64 %66, i64 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to reproduce this with opt -passes=instcombine version.ll -S -o 1.ll
and I can see the freezes get pushed through the icmp
s and phi
s into the .lr.ph
block, but I can't see this call to umax
. How can I reproduce?
Full output is here: https://gist.githubusercontent.com/c-rhodes/cbc106cafdbb56ae1d1211d309329d28/raw/b0d3a707f814be3a25735acc64e4f58c0368e536/1.ll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, just a thought, have you considered tracking number of freeze instructions using the stats from the instcount pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to reproduce this with
opt -passes=instcombine version.ll -S -o 1.ll
and I can see the freezes get pushed through theicmp
s andphi
s into the.lr.ph
block, but I can't see this call toumax
. How can I reproduce?Full output is here: https://gist.githubusercontent.com/c-rhodes/cbc106cafdbb56ae1d1211d309329d28/raw/b0d3a707f814be3a25735acc64e4f58c0368e536/1.ll
This is an end-to-end test. You can reproduce it with the options here:
llvm-opt-benchmark/scripts/update.py
Lines 206 to 209 in 7092bf8
cmd = [ | |
OPT_EXEC, "-O3", "-disable-loop-unrolling", | |
"-vectorize-loops=false", "-vectorize-slp=false", input_file, "-S" | |
] |
I will update the README later.
Also, just a thought, have you considered tracking number of freeze instructions using the stats from the instcount pass?
We can add a new stat counter for the number of times pushFreezeToPreventPoisonFromPropagating
is triggered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't see this call to umax with those flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link: llvm/llvm-project#150420
Requested by: @dtcxzyw