- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
pre-commit: PR155415 #2716
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: PR155415 #2716
Conversation
| Diff moderunner: ariselab-64c-docker 19800 files changed, 5876089 insertions(+), 5884141 deletions(-) 11	12	bench/abc/optimized/aigCanon.ll | 
| The provided patch consists of numerous changes across multiple files, primarily involving modifications to  
 These changes collectively aim to improve the efficiency of the generated code by reducing the complexity of pointer arithmetic and eliminating redundant operations. model: qwen-plus-latest | 
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.
Not fully reviewed yet, but the tl;dr here is that this causes the gep + add -> gep + gep fold to fire much more often. This causes many improvements (where there variable part of the GEP is CSEd and we're left with a constant GEP), and a few regressions where null checks are not eliminated anymore due to lost flags.
| %.0.i.i = or i1 %6, %7 | ||
| %3 = getelementptr i8, ptr %0, i64 %1 | ||
| %4 = getelementptr i8, ptr %3, i64 -1 | ||
| %5 = icmp eq ptr %4, null | 
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 due to flag loss from gep+add reassociation.
| br i1 %.not12, label %.critedge, label %.lr.ph | ||
| %23 = getelementptr i16, ptr %22, i64 %.promoted | ||
| %24 = getelementptr i8, ptr %23, i64 -2 | ||
| %25 = icmp eq ptr %24, null | 
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.
Another null comparison regression.
| /close | 
Link: llvm/llvm-project#155415
Requested by: @nikic