[all-commits] [llvm/llvm-project] 6f0017: [LSR] Rework term-fold tests

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Mar 17 16:03:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f00170159f0427607f8a7847448ee9e36d3fcf7
      https://github.com/llvm/llvm-project/commit/6f00170159f0427607f8a7847448ee9e36d3fcf7
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold-negative-testcase.ll
    M llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll

  Log Message:
  -----------
  [LSR] Rework term-fold tests

There were two major problems with the tests.

First, with the pointer size being 32 bit and the original IVs also being 32 bit, almost all of the positive tests were actually unsound.  An upcoming change will add the appropriate safety check, but the test diffs are really hard to understand without switching the tests to 64 bit pointers first.

Second, checking debug messages for failures is a major bad practice.  This should not have been accepted in review at all.  The reason is that it makes the *order* of legality checks visibile and modifying any of them becomes annoying and tedious.




More information about the All-commits mailing list