mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-16 09:30:09 +00:00
4f657df0db
Normally, when an AND with a constant is lowered to NILL, the constant value is truncated to 16 bits. However, since r274066, ANDs whose results are used in a shift are caught by a different pattern that does not truncate. The instruction printer expects a 16-bit unsigned immediate operand for NILL, so this results in an abort. This patch adds code to manually truncate the constant in this situation. The rest of the bits are then set, so we will detect a case for NILL "naturally" rather than using peephole optimizations. Differential Revision: http://reviews.llvm.org/D21854 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279105 91177308-0d34-0410-b5e6-96231b3b80d8