Commit cd1dcd2c authored by Nikita Popov's avatar Nikita Popov
Browse files

[InstCombine] Handle const select arm in foldSelectCtlzToCttz()

The select arm that takes the ctlz result can also instead be a
constant with the bit width (as this is what the ctlz evaluates to
for a==0).

This avoids a regression when strengthening the
simplifyWithOpReplaced() fold.

Proof: https://alive2.llvm.org/ce/z/DMRL5A
parent 701a8b34
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment