[PATCH] D49229: [InstCombine] Fold redundant masking operations of shifted value

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 05:53:44 PDT 2018


lebedev.ri added a reviewer: lebedev.ri.
lebedev.ri added a comment.

Would be good if you could also put these folds into https://rise4fun.com/Alive and link them here,
to validate that at least the cases tested here are handled correctly.



================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2838
+
+  for (auto OtherUserV : MaskedValue->users()) {
+    BinaryOperator *OtherUser = dyn_cast<BinaryOperator>(OtherUserV);
----------------
Is this even for instcombine?
I wonder if this should be aggressiveinstcombine, or something else?


================
Comment at: test/Transforms/InstCombine/D48278.ll:1
+; RUN: opt -S -O3 %s -o - | FileCheck %s
+
----------------
1. use `./utils/update_test_checks.py`
2. Don't use `-O3`, specify `-instcombine`
3. Please clean up the test cases, run `-O3 -instnamer` on it beforehand.
4. How about calling the filename a bit more meaningful name?


Repository:
  rL LLVM

https://reviews.llvm.org/D49229





More information about the llvm-commits mailing list