[all-commits] [llvm/llvm-project] 8a469e: [InstSimplify] Fold inbounds GEP to poison if base...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jan 11 08:23:23 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a469e20505fd9b8daddd88227ff33888d6be821
      https://github.com/llvm/llvm-project/commit/8a469e20505fd9b8daddd88227ff33888d6be821
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-01-11 (Tue, 11 Jan 2022)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/gep.ll

  Log Message:
  -----------
  [InstSimplify] Fold inbounds GEP to poison if base is undef.

D92270 updated constant expression folding to fold inbounds GEP to
poison if the base is undef. Apply the same logic to SimplifyGEPInst.

The justification is that we can choose an out-of-bounds pointer as base
pointer.

Reviewed By: nikic, lebedev.ri

Differential Revision: https://reviews.llvm.org/D117015




More information about the All-commits mailing list