[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

Björn Pettersson via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 09:42:20 PST 2023


bjope wrote:

Here is another thing that I noticed after this patch: https://godbolt.org/z/1P7bnKGjh

So early instcombine is eliminating an `and` operation (in the foo example), resulting in simplifycfg not being able to collapse the control flow any longer.

Maybe I should file a separate issue for that?

Not sure if it should be consider as a phase ordering problem. Had perhaps been nice if simplifycfg had been able to understand that it basically could match an `and` with a no-op by using a -1 mask, etc.

https://github.com/llvm/llvm-project/pull/73662


More information about the cfe-commits mailing list