[all-commits] [llvm/llvm-project] 1587c7: [Scalarizer] Treat values from unreachable blocks ...

mikaelholmen via All-commits all-commits at lists.llvm.org
Fri Nov 15 02:16:15 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1587c7e86f1c58e3f692f0a418e5df6aeb754bb0
      https://github.com/llvm/llvm-project/commit/1587c7e86f1c58e3f692f0a418e5df6aeb754bb0
  Author: Mikael Holmen <mikael.holmen at ericsson.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp
    A llvm/test/Transforms/Scalarizer/phi-unreachable-pred.ll

  Log Message:
  -----------
  [Scalarizer] Treat values from unreachable blocks as undef

Summary:
When scalarizing PHI nodes we might try to examine/rewrite
InsertElement nodes in predecessors. If those predecessors
are unreachable from entry, then the IR in those blocks could
have unexpected properties resulting in infinite loops in
Scatterer::operator[].
By simply treating values originating from instructions in
unreachable blocks as undef we do not need to analyse them
further.

This fixes PR41723.

Reviewers: bjope

Reviewed By: bjope

Subscribers: bjope, hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list