[GISel]: Fix a bug in KnownBits where we should have been using SizeInBits
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Mon, 12 Aug 2019 21:28:12 +0000 (21:28 +0000)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Mon, 12 Aug 2019 21:28:12 +0000 (21:28 +0000)
commit55371e697cd41cc1c282aa9a7bc3baa6164659a9
tree00fb984385c24003040bbb33ca9257e6534d40a2
parent74cec618f304e88ca83875e84978acfa1b8cc1ec
[GISel]: Fix a bug in KnownBits where we should have been using SizeInBits

https://reviews.llvm.org/D66039

We were using getIndexSize instead of getIndexSizeInBits().
Added test case for G_PTRTOINT and G_INTTOPTR.

llvm-svn: 368618
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp