[PATCH] When canonicalizing gep indices, prefer zext when possible (SelectionDAGBuilder)
hfinkel at anl.gov
hfinkel at anl.gov
Fri Feb 13 15:52:51 PST 2015
Part of the issue is that this canonicalization already exists in DAGCombine (at the end of DAGCombiner::visitSIGN_EXTEND):
// fold (sext x) -> (zext x) if the sign bit is known zero.
if ((!LegalOperations || TLI.isOperationLegal(ISD::ZERO_EXTEND, VT)) &&
DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, N0);
As a result, I'm not sure this is needed.
http://reviews.llvm.org/D7626
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list