[PATCH] D50964: [Sparc] Use ANDN instead of AND if constant can be encoded more efficiently
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 26 09:17:23 PDT 2018
jyknight accepted this revision.
jyknight added a comment.
This revision is now accepted and ready to land.
Seems unclear to me that the "more than one use" bit is the right assumption. But sure, let's go with that for now.
================
Comment at: lib/Target/Sparc/SparcInstrInfo.td:103
+def SETHIimm_not : PatLeaf<(i32 imm), [{
+ return N->hasOneUse() && isShiftedUInt<22, 10>(~(unsigned)N->getZExtValue());
+}], HI22_not>;
----------------
Please add the rationale for "N->hasOneUse()" in a comment here, not just in commit message.
Repository:
rL LLVM
https://reviews.llvm.org/D50964
More information about the llvm-commits
mailing list