[PATCH] D50972: [InstCombine] Fold icmp ugt/ult (add nuw X, C2), C --> icmp ugt/ult X, (C - C2)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 04:55:58 PDT 2018


spatel added inline comments.


================
Comment at: test/Transforms/InstCombine/icmp-add.ll:1
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -instcombine -S | FileCheck %s
----------------
Nicola wrote:
> spatel wrote:
> > Please commit the tests first. Use this script to auto-generate the current results. Then, update with this patch and auto-generate the new results.
> Ok, thanks. I'll create a separate review for it.
> Should I also regenerate all the other tests that I'm touching? LoopVectorize/runtime-check.ll is adding a lot on new checks, and some others are changing in InstCombine/icmp-add.ll
No, it's not necessary to regenerate everything. I suggest doing it for this file because these are the primary/minimal tests for the transform though. If the patch gets reverted for some reason, we want to keep the evidence that we're missing an optimization.

And yes, other tests in the file will be affected if we regenerate the whole thing. That's ok; an older version of the script was used previously, and it behaved slightly differently. Alternatively, you can auto-gen just the new functions by specifying "--function=foo" as a parameter.


Repository:
  rL LLVM

https://reviews.llvm.org/D50972





More information about the llvm-commits mailing list