[all-commits] [llvm/llvm-project] 254488: [InstSimplify] Update test to make miscompile more...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jan 4 07:08:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25448826dd4c1965be08fa38cc02de9551084262
      https://github.com/llvm/llvm-project/commit/25448826dd4c1965be08fa38cc02de9551084262
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll

  Log Message:
  -----------
  [InstSimplify] Update test to make miscompile more obvious (NFC)

This is now testing (null + g3) != g3 and still coming up with
"true" as the answer. The original case was a less obvious
miscompile with index overflow involved.


  Commit: 6c031780aa2c08996d1351de5e7541c75d6645c5
      https://github.com/llvm/llvm-project/commit/6c031780aa2c08996d1351de5e7541c75d6645c5
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll

  Log Message:
  -----------
  [ConstantFold] Remove another incorrect icmp of gep fold

This folded (null + X) == g to false, but of course this is
incorrect if X == g.

Possibly this got confused with the null == g case, which is
already handled elsewhere.


Compare: https://github.com/llvm/llvm-project/compare/875dd75e5ab4...6c031780aa2c


More information about the All-commits mailing list