]> granicus.if.org Git - llvm/commit
[globalisel][knownbits] Account for missing type constraints
authorDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 5 Sep 2019 20:26:02 +0000 (20:26 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 5 Sep 2019 20:26:02 +0000 (20:26 +0000)
commit58aaf33c575cab0de1e48ab218e4a1269013542b
tree2e09328600e50f6618c60604830814417eb71a83
parentda97aa058df154078b8d8b4e4aa7c69c4a2a9323
[globalisel][knownbits] Account for missing type constraints

Now that we look through copies, it's possible to visit registers that
have a register class constraint but not a type constraint. Avoid looking
through copies when this occurs as the SrcReg won't be able to determine
it's bit width or any known bits.

Along the same lines, if the initial query is on a register that doesn't
have a type constraint then the result is a default-constructed KnownBits,
that is, a 1-bit fully-unknown value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371116 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/GISelKnownBits.cpp
unittests/CodeGen/GlobalISel/KnownBitsTest.cpp