mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 05:56:05 +00:00
[ConstantFold] Remove handling for comparison of bitcasted global (NFCI)
The bitcast will be folded away in this case, no need to handle it explicitly.
This commit is contained in:
parent
c1a9eabf56
commit
fe206578f2
@ -1244,12 +1244,6 @@ static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2,
|
||||
|
||||
switch (CE1->getOpcode()) {
|
||||
case Instruction::BitCast:
|
||||
// If this is a global value cast, check to see if the RHS is also a
|
||||
// GlobalValue.
|
||||
if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0))
|
||||
if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2))
|
||||
return areGlobalsPotentiallyEqual(GV, GV2);
|
||||
|
||||
// We can't evaluate floating point casts or truncations.
|
||||
if (CE1Op0->getType()->isFPOrFPVectorTy())
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user