[PATCH] D68930: [InstCombine] Shift amount reassociation in shifty sign bit test (PR43595)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 10:39:33 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:29-30
+//
+// AnalysisIsSignbitExtract is special - we will only analyze whether this
+// pattern has two right-shifts that shift my one less than original bit width,
+// thus extracting original sign bit, and return the base value X if so.
----------------
spatel wrote:
> Code comment typo and difficult to parse. Maybe better:
> AnalyzeForSignBitExtraction indicates that we will only analyze whether this pattern has any 2 right-shifts that sum to 1 less than original bit width.
Indeed, that is better; and fixes the param name.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68930/new/

https://reviews.llvm.org/D68930





More information about the llvm-commits mailing list