Apparently this works by virtue of the fact that the pointers are pointers to the APInts stored inside of the ConstantInt objects. But I really don't think we should be relying on that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314761
91177308-0d34-0410-b5e6-
96231b3b80d8
const APInt *BOC;
if (match(BOp1, m_APInt(BOC))) {
// If we have ((X & C) == C), turn it into ((X & C) != 0).
- if (C == BOC && C->isPowerOf2())
+ if (*C == *BOC && C->isPowerOf2())
return new ICmpInst(isICMP_NE ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE,
BO, Constant::getNullValue(RHS->getType()));