Displaying 1 result from an estimated 1 matches for "havenocommonbitsset".
2019 Mar 13
2
llvm combines "ADD frameindex, constant" to OR
...64<0>, Constant:i64<56>
... into: t121: i64 = or FrameIndex:i64<0>, Constant:i64<56>
This caused problem if frame pointer points 0x60000038 at run time.
I checked DAGCombiner::visitADD. It folds ADD to OR by following code
without considering about FrameIndex. This haveNoCommonBitsSet says
it's safe since FrameIndex(0) is 0.
// fold (a+b) -> (a|b) iff a and b share no bits.
if ((!LegalOperations || TLI.isOperationLegal(ISD::OR, VT)) &&
DAG.haveNoCommonBitsSet(N0, N1))
return DAG.getNode(ISD::OR, DL, VT, N0, N1);
I checked visitADD m...