[GlobalISel] Implement computeKnownBits for G_ASSERT_ZEXT
authorJessica Paquette <jpaquette@apple.com>
Wed, 27 Jan 2021 22:01:38 +0000 (14:01 -0800)
committerJessica Paquette <jpaquette@apple.com>
Fri, 29 Jan 2021 00:34:34 +0000 (16:34 -0800)
commitf19971d1ded2a983efd58eca0393026909368f44
treebdf470f093b7961322f561c4fbfc473b631d2afb
parentd73564c510036b2d4f5858effdcd23fe54fc1063
[GlobalISel] Implement computeKnownBits for G_ASSERT_ZEXT

It's the same as the ZEXT/TRUNC case, except SrcBitWidth is given by the
immediate operand.

Update KnownBitsTest.cpp and a MIR test for a concrete example.

Differential Revision: https://reviews.llvm.org/D95566
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-and-trivial-mask.mir
llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp