[all-commits] [llvm/llvm-project] d610f0: [NFC][CVP] Add tests for @llvm.[us]{min, max}() int...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sat Apr 10 14:34:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d610f051045163f781ebc6da2e97414deafecd1e
      https://github.com/llvm/llvm-project/commit/d610f051045163f781ebc6da2e97414deafecd1e
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

  Changed paths:
    A llvm/test/Transforms/CorrelatedValuePropagation/min-max.ll

  Log Message:
  -----------
  [NFC][CVP] Add tests for @llvm.[us]{min,max}() intrinsics


  Commit: 9829f5e6b1bca9b61efc629770d28bb9014dec45
      https://github.com/llvm/llvm-project/commit/9829f5e6b1bca9b61efc629770d28bb9014dec45
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/LazyValueInfo.h
    M llvm/lib/Analysis/LazyValueInfo.cpp
    M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    M llvm/test/Transforms/CorrelatedValuePropagation/min-max.ll

  Log Message:
  -----------
  [CVP] @llvm.[us]{min,max}() intrinsics handling

If we can tell that either one of the arguments is taken,
bypass the intrinsic.

Notably, we are indeed fine with non-strict predicate:
* UL: https://alive2.llvm.org/ce/z/69qVW9 https://alive2.llvm.org/ce/z/kNFTKf
      https://alive2.llvm.org/ce/z/AvaPw2 https://alive2.llvm.org/ce/z/oxo53i
* UG: https://alive2.llvm.org/ce/z/wxHeGH https://alive2.llvm.org/ce/z/Lf76qx
* SL: https://alive2.llvm.org/ce/z/hkeTGS https://alive2.llvm.org/ce/z/eR_b-W
* SG: https://alive2.llvm.org/ce/z/wEqRm7 https://alive2.llvm.org/ce/z/FpAsVr

Much like with all other comparison handling in CVP,
while we could sort-of handle two Value's,
at least for plain ICmpInst it does not appear to be worthwhile.

This only fires 78 times on test-suite + dt + rs,
but we don't canonicalize to these yet. (only SCEV produces them)


Compare: https://github.com/llvm/llvm-project/compare/8de2f1ff79aa...9829f5e6b1bc


More information about the All-commits mailing list