Skip to content
Commit 9ee054ae authored by Mehdi Amini's avatar Mehdi Amini
Browse files

ValueMapper: fix typo in minor optimization on constant mapping (NFC)

If every operands of a constant are mapping to themselves, and the
type does not change, we have an early exit as acknowledged in the
comment:

  // Otherwise, we have some other constant to remap.  Start by checking to see
  // if all operands have an identity remapping.

However instead of checking for identity the code was checking if the
operands were mapped to the constant itself, which is rarely true.

As a consequence, the coverage report showed that the early exit was
never taken.

llvm-svn: 270944
parent 6816367a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment