[llvm] r303185 - [InstCombine] add motivational comment for tests; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 09:30:46 PDT 2017


Author: spatel
Date: Tue May 16 11:30:46 2017
New Revision: 303185

URL: http://llvm.org/viewvc/llvm-project?rev=303185&view=rev
Log:
[InstCombine] add motivational comment for tests; NFC

The referenced tests are derived from:
https://bugs.llvm.org/show_bug.cgi?id=32791
and:
https://reviews.llvm.org/D33172

The motivation for including negative tests may not be clear, so I'm adding an explanatory comment here.
In the post-commit thread for r303133:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170515/453793.html
...it was mentioned that we don't want to add redundant tests. This is a valid point. But in this case, 
we have a patch under review (D33172) that demonstrates that no existing regression tests are affected by
a proposed code change, but these are. Therefore, I think these tests have value not visible in any 
existing regression tests regardless of whether they show a transform.

Differential Revision: https://reviews.llvm.org/D33242

Modified:
    llvm/trunk/test/Transforms/InstCombine/logical-select.ll

Modified: llvm/trunk/test/Transforms/InstCombine/logical-select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/logical-select.ll?rev=303185&r1=303184&r2=303185&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/logical-select.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/logical-select.ll Tue May 16 11:30:46 2017
@@ -62,6 +62,11 @@ define i32 @poo(i32 %a, i32 %b, i32 %c,
   ret i32 %t3
 }
 
+; TODO: For the next 4 tests, are there potential canonicalizations and/or folds for these
+; in InstCombine? Independent of that, tests like this that may not show any transforms 
+; still have value because they can help identify conflicting canonicalization rules that 
+; lead to infinite looping. 
+
 ; PR32791 - https://bugs.llvm.org//show_bug.cgi?id=32791
 ; Fold two selects with inverted predicates and zero operands.
 define i32 @fold_inverted_icmp_preds(i32 %a, i32 %b, i32 %c, i32 %d) {




More information about the llvm-commits mailing list