[all-commits] [llvm/llvm-project] 9aa142: [InstSimplify] Treat invariant group insts as bitc...

aeubanks via All-commits all-commits at lists.llvm.org
Tue Jun 15 13:00:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9aa1428174ae5d0515f49d50a483a5517f4df2f4
      https://github.com/llvm/llvm-project/commit/9aa1428174ae5d0515f49d50a483a5517f4df2f4
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-06-15 (Tue, 15 Jun 2021)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    A llvm/test/Transforms/InstSimplify/invalid-load-operand-infinite-loop.ll
    M llvm/test/Transforms/InstSimplify/invariant.group-load.ll

  Log Message:
  -----------
  [InstSimplify] Treat invariant group insts as bitcasts for load operands

We can look through invariant group intrinsics for the purposes of
simplifying the result of a load.

Since intrinsics can't be constants, but we also don't want to
completely rewrite load constant folding, we convert the load operand to
a constant. For GEPs and bitcasts we just treat them as constants. For
invariant group intrinsics, we treat them as a bitcast.

Relanding with a check for self-referential values.

Reviewed By: lebedev.ri

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




More information about the All-commits mailing list