-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove IFLAGS/FFLAGS types #5406
Conversation
@@ -1508,39 +1507,4 @@ mod tests { | |||
assert_eq!(dfg.value_is_attached(arg3), false); | |||
assert_eq!(dfg.block_params(block), &[]); | |||
} | |||
|
|||
#[test] | |||
fn aliases() { |
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.
Rather than removing this test, could you change it to avoid iflags?
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.
Ah, I see I misinterpreted the purpose of the test. Now changed to use iadd_cout
/ icmp
instead of iadd_ifcout
/ ifcmp
instead.
; check: v20, v21 = iadd_ifcarry v2, v5, v11 | ||
v30 = iadd_ifcin v3, v6, v21 | ||
; check: v30 = iadd_ifcin v3, v6, v21 | ||
return v10, v20, v30 |
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.
Maybe test parsing select
instead? That is also a ternary instruction.
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.
Changed to iadd_cout
and friends as well. Also added a select
test for completeness.
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.
Thanks a bunch for doing this work! It looks pretty straightforwardly correct -- just a bunch of special cases going away, which is always great to see.
Happy to merge once @bjorn3's suggestions are done!
c79acc7
to
36ae7b0
Compare
CI breakage looks to be because of an Ubuntu upgrade; created #5407, and we'll want to rebase this on that if it works and merges. |
All instructions using the CPU flags types (IFLAGS/FFLAGS) were already removed. This patch completes the cleanup by removing all remaining instructions that define values of CPU flags types, as well as the types themselves. Specifically, the following features are removed: - The IFLAGS and FFLAGS types and the SpecialType category. - Special handling of IFLAGS and FFLAGS in machinst/isle.rs and machinst/lower.rs. - The ifcmp, ifcmp_imm, ffcmp, iadd_ifcin, iadd_ifcout, iadd_ifcarry, isub_ifbin, isub_ifbout, and isub_ifborrow instructions. - The writes_cpu_flags instruction property. - The flags verifier pass. - Flags handling in the interpreter. All of these features are currently unused; no functional change intended by this patch. This addresses bytecodealliance#3249.
Thanks! Tests are passing now. |
All instructions using the CPU flags types (IFLAGS/FFLAGS) were already removed. This patch completes the cleanup by removing all remaining instructions that define values of CPU flags types, as well as the types themselves.
Specifically, the following features are removed:
All of these features are currently unused; no functional change intended by this patch.
This addresses #3249.
CC @cfallin @elliottt @jameysharp