Allow scalable vectors in ComputeNumSignBits and isKnownNonNull
authorPhilip Reames <preames@rivosinc.com>
Tue, 1 Nov 2022 16:22:24 +0000 (09:22 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 1 Nov 2022 16:29:42 +0000 (09:29 -0700)
commit2e999b7dd1934a44d38c3a753460f1e5a217e9a5
treed115e68da16235d3276443fcebfada825bdfbe0e
parenta715b1bde91077b313b9c36d9ecbc0c83a0edac2
Allow scalable vectors in ComputeNumSignBits and isKnownNonNull

This is a follow up to D136470 which extends the same scheme used there to ComputeNumSignBits and isKnownNonNull. As a reminder, for scalable vectors we track a single bit which is implicitly broadcast to all lanes. We do not know how many lanes there are statically, and thus have to be conservative along paths which require exact sizes.

Differential Revision: https://reviews.llvm.org/D137046
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/logical-select.ll
llvm/test/Transforms/InstCombine/select.ll