[PATCH] D46595: [InstCombine] Apply SimplifyUsingDistributiveLaws to associative/commutative cases.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 10:49:53 PDT 2018


yamauchi added inline comments.


================
Comment at: test/Transforms/InstCombine/bit-check-combine.ll:3
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instcombine -gvn -instcombine -S | FileCheck %s --check-prefix=COMPLEX
+
----------------
spatel wrote:
> The general direction is still under discussion, but I want to point out some test changes that would make this easier to understand:
> 
> 1. Unless there's some exceptional circumstance, we shouldn't have regression tests for anything but instcombine here. If you want to check more than that, you might add something under tests/PhaseOrdering.
> 
> 2. I'm having a hard time seeing the motivating patterns for these tests. The 2nd and 3rd tests are already canonicalized by instcombine to the asserted forms shown in the CHECK lines? The 1st test gets reduced significantly. The 4th test should not require 8 params, loads, etc.
Acknowledged.

Yes, the second and third ones are fine, I put there to contrast. The 4th one is from real code, I'll try to see if I can reduce it further.


Repository:
  rL LLVM

https://reviews.llvm.org/D46595





More information about the llvm-commits mailing list