[PATCH] D65046: [InstCombine] Fold "x ?% y ==/!= 0" to "x & (y-1) ==/!= 0" iff y is power-of-two

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 13:46:52 PDT 2019


xbolva00 added inline comments.


================
Comment at: llvm/include/llvm/IR/PatternMatch.h:971
 
+struct is_irem_op {
+  bool isOpType(unsigned Opcode) {
----------------
Maybe separate patch + test for IRem?

Not sure if needed, since this fold “tests” it actually..


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65046





More information about the llvm-commits mailing list