Peephole optimize x == false and x != true#86107
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
|
⌛ Trying commit 2f1c219 with merge e2c32a71d8e2919c91fcde05b55ff8c486a9cdc2... |
|
r? @wesleywiser |
|
☀️ Try build successful - checks-actions |
|
Queued e2c32a71d8e2919c91fcde05b55ff8c486a9cdc2 with parent e4a6032, future comparison URL. |
|
Finished benchmarking try commit (e2c32a71d8e2919c91fcde05b55ff8c486a9cdc2): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
|
@bors r+ |
|
📌 Commit 2f1c219 has been approved by |
|
☀️ Test successful - checks-actions |
This adds peephole optimizations to make
x == false,false == x,x != true, andtrue != xget optimized to!xin theinstcombineMIR pass. That pass currently handlesx == true->xalready.