]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #86107 - Smittyvb:peephole-optim-eq-bool, r=wesleywiser
authorbors <bors@rust-lang.org>
Wed, 9 Jun 2021 06:06:06 +0000 (06:06 +0000)
committerbors <bors@rust-lang.org>
Wed, 9 Jun 2021 06:06:06 +0000 (06:06 +0000)
commitd45d205d59bd9eaca352e3a8f18c625f47f5838b
tree0f893fbff81c786d9deea4c34cf594f1b3ecd2ec
parentc8381389ee10e3c0505ccb5bac05382de1b9f99d
parent2f1c2193d1e9a01adbf5b7886eee229242407dcb
Auto merge of #86107 - Smittyvb:peephole-optim-eq-bool, r=wesleywiser

Peephole optimize `x == false` and `x != true`

This adds peephole optimizations to make `x == false`, `false == x`, `x != true`, and `true != x` get optimized to `!x` in the `instcombine` MIR pass. That pass currently handles `x == true` -> `x` already.