aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2024-07-18 11:54:22 +0200
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2024-07-19 12:44:47 +0200
commit098bd842a7e50853fa231f8b73c24ec5006fe063 (patch)
treead8f086c922eebdfb83aa638cc9b2e47d3992e15 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent812694c449b222e960a39ccb517a074c08db4a71 (diff)
downloadllvm-098bd842a7e50853fa231f8b73c24ec5006fe063.zip
llvm-098bd842a7e50853fa231f8b73c24ec5006fe063.tar.gz
llvm-098bd842a7e50853fa231f8b73c24ec5006fe063.tar.bz2
[ValueTracking] Let ComputeKnownSignBits handle (shl (zext X), C) (#97693)
Add simple support for looking through a zext when doing ComputeKnownSignBits for shl. This is valid for the case when all extended bits are shifted out, because then the number of sign bits can be found by analysing the zext operand. The solution here is simple as it only handle a single zext (not passing remaining left shift amount during recursion). It could be possible to generalize this in the future by for example passing an 'OffsetFromMSB' parameter to ComputeNumSignBitsImpl, telling it to calculate number of sign bits starting at some offset from the most significant bit.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions