[PATCH] D68263: [NFC][InstCombine] Add tests that show a number of canonicalization opportunities

Daniil Suchkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 03:46:15 PDT 2019


DaniilSuchkov added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/phi-equal-incoming-pointers.ll:2-5
+; RUN: opt -passes=instcombine,verify -S < %s | FileCheck %s
+
+; Make sure GVN won't undo the transformation:
+; RUN: opt -passes=instcombine,gvn -S < %s | FileCheck --check-prefix=CHECK-AFTER-GVN %s
----------------
lebedev.ri wrote:
> In general depending on more than one pass in tests is frowned upon.
> Does 
> ```
> ; RUN: opt -passes=instcombine,verify -S < %s | FileCheck %s --check-prefixes=ALL,INSTCOMBINE
> 
> ; Make sure GVN won't undo the transformation:
> ; RUN: opt -passes=instcombine,gvn -S < %s | FileCheck --check-prefixes=ALL,INSTCOMBINEGVN %s
> ```
> get rid of dedicated `; CHECK-AFTER-GVN` check lines?
Thanks for the suggestion, it simplifies checks for all but two tests. Will update the patch soon.

> In general depending on more than one pass in tests is frowned upon.
I don't like it either, so any suggestions on how to get rid of it without compromising reliability of these tests are welcome.


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

https://reviews.llvm.org/D68263





More information about the llvm-commits mailing list