[all-commits] [llvm/llvm-project] ad742c: [DAGCombine] Handle promotion of shift with both o...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jun 3 01:01:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad742cf85da105c9374aa24764b30f5ff668e361
      https://github.com/llvm/llvm-project/commit/ad742cf85da105c9374aa24764b30f5ff668e361
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-03 (Fri, 03 Jun 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/X86/promote-sra-by-itself.ll

  Log Message:
  -----------
  [DAGCombine] Handle promotion of shift with both operands the same

When promoting a shift, make sure we only fetch the second operand
after promoting the first. Load promotion may replace users of the
old load, and we don't want to be left with a dangling reference to
the old load instruction.

The crashing test case is from https://reviews.llvm.org/D126689#3553212.

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




More information about the All-commits mailing list