Skip to content
Commit 2f9c6daf authored by Craig Topper's avatar Craig Topper
Browse files

[InstCombine] Merge together the SimplifyDemandedUseBits implementations for ZExt and Trunc. NFC

While there avoid resizing the DemandedMask twice. Make a copy into a separate variable instead. This potentially removes an allocation on large bit widths.

With the use of the zextOrTrunc methods on APInt and KnownBits these can be made almost source identical. The only difference is the zero of the upper bits for ZExt. This is similar to how its done in computeKnownBits in ValueTracking.

llvm-svn: 303791
parent 1a0128fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment