forked from OSchip/llvm-project
parent
14cd1ee95f
commit
912bec79ca
|
@ -571,7 +571,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
|
||||||
|
|
||||||
if (GVAlign > 1) {
|
if (GVAlign > 1) {
|
||||||
unsigned DstWidth = CI2->getType()->getBitWidth();
|
unsigned DstWidth = CI2->getType()->getBitWidth();
|
||||||
unsigned SrcWidth = std::min(SrcWidth, Log2_32(GVAlign));
|
unsigned SrcWidth = std::min(DstWidth, Log2_32(GVAlign));
|
||||||
APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
|
APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
|
||||||
|
|
||||||
// If checking bits we know are clear, return zero.
|
// If checking bits we know are clear, return zero.
|
||||||
|
|
Loading…
Reference in New Issue