[all-commits] [llvm/llvm-project] 7faad5: [ConstantFold] Handle icmp of global and null cons...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Mar 8 08:20:12 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7faad5c90033c56a32b07eac527a456d60ed9a70
      https://github.com/llvm/llvm-project/commit/7faad5c90033c56a32b07eac527a456d60ed9a70
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-08 (Mon, 08 Mar 2021)

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

  Log Message:
  -----------
  [ConstantFold] Handle icmp of global and null consistently

Return UGT rather than NE for icmp @g, null, which is slightly
stronger. This is consistent with what we do for more complex
folds. It is somewhat silly that @g ugt null does not get folded
while (gep @g) ugt null does.




More information about the All-commits mailing list