-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[IR] Avoid creating icmp/fcmp constant expressions #92885
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ | |
// CHECK: entry: | ||
// CHECK-NEXT: %retval = alloca i32 | ||
// CHECK-NEXT: store i32 0, ptr %retval | ||
// CHECK-NEXT: [[ZEXT:%.*]] = zext i1 true to i32 | ||
// CHECK-NEXT: [[CMP:%.*]] = icmp ne ptr @b, @a | ||
// CHECK-NEXT: [[ZEXT:%.*]] = zext i1 [[CMP]] to i32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks to be a missing constant fold somewhere. The compare should be folded to true, not a constantexpr. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, ignore me. I didn't realize this was specific testing unsimplified IR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember looking into this test a while ago (the |
||
// CHECK-NEXT: [[SITOFP:%.*]] = sitofp i32 [[ZEXT]] to float | ||
// CHECK-NEXT: [[LV:%.*]] = load ptr, ptr @c | ||
// CHECK-NEXT: store float [[SITOFP]], ptr [[LV]], align 4 | ||
|
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.
That diff is awful. We should make
update_cc_test_checks.py
usecollect_original_check_lines
:)