Revert "[InstSimplify] Bypass no-op `and`-mask, using known bits (PR49543)"
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 21 Apr 2021 07:44:54 +0000 (09:44 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 21 Apr 2021 07:55:25 +0000 (09:55 +0200)
commitde18fa9e52a439798edf89df6fee807908814416
treecfa052f2b38f98ce167b5efb01a179ba7d3c2063
parenteecb4b478fecf340a01bd5e04c7df565926f16f7
Revert "[InstSimplify] Bypass no-op `and`-mask, using known bits (PR49543)"

This reverts commit ea1a0d7c9ae3e5232a4163fc67efad4aabd51f2b.

While this is strictly more powerful, it is also strictly slower.
InstSimplify intentionally does not perform many folds that it
is allowed to perform, if doing so requires a KnownBits calculation
that will be repeated in InstCombine.

Maybe it's worthwhile to do this here, but that needs a more
explicitly stated motivation, evaluated in a review.
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/AndOrXor.ll