[all-commits] [llvm/llvm-project] 4d3284: [ConstFold] Add test for incorrect gep inbounds of...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue May 28 02:14:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d3284cadfa0dc9850d58b97e943481a30c39c1b
      https://github.com/llvm/llvm-project/commit/4d3284cadfa0dc9850d58b97e943481a30c39c1b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M llvm/test/Transforms/InstSimplify/ConstProp/poison.ll

  Log Message:
  -----------
  [ConstFold] Add test for incorrect gep inbounds of undef fold (NFC)

If the offset is zero, then returning poison here is not correct.


  Commit: 1383cb6e648ba9f4516fa2317f948116c4f35c10
      https://github.com/llvm/llvm-project/commit/1383cb6e648ba9f4516fa2317f948116c4f35c10
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

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

  Log Message:
  -----------
  [ConstFold] Fix incorrect gep inbounds of undef fold

gep inbounds of undef can only be folded to poison if we know
that the offset is non-zero. I don't think precise handling here
is important, so just drop the inbounds special case. This matches
what InstSimplify does.


Compare: https://github.com/llvm/llvm-project/compare/8a395b00b85a...1383cb6e648b

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list