mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Do not compute 1ULL << 64, which is undefined. This fixes Ptrdist/ks on the
sparc, and testcase Regression/Transforms/InstCombine/2005-03-04-ShiftOverflow.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cff1fe5f9f
commit
8b9081081b
@ -2563,6 +2563,7 @@ Instruction *InstCombiner::visitSetCondInst(BinaryOperator &I) {
|
||||
Constant *Mask;
|
||||
if (CI->getType()->isUnsigned()) {
|
||||
unsigned TypeBits = CI->getType()->getPrimitiveSize()*8;
|
||||
if (TypeBits != 64)
|
||||
Val &= (1ULL << TypeBits)-1;
|
||||
Mask = ConstantUInt::get(CI->getType(), Val);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user