[all-commits] [llvm/llvm-project] 9db3e5: [InstCombine] Fix infinite loop in min/max load/st...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Feb 10 02:26:16 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9db3e5d5156bc2a3ba8ec0d70ab7069a82472fbb
      https://github.com/llvm/llvm-project/commit/9db3e5d5156bc2a3ba8ec0d70ab7069a82472fbb
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    A llvm/test/Transforms/InstCombine/pr44835.ll

  Log Message:
  -----------
  [InstCombine] Fix infinite loop in min/max load/store bitcast combine (PR44835)

Fixes https://bugs.llvm.org/show_bug.cgi?id=44835. Skip the transform
if it wouldn't actually do anything (apart from removing and reinserting
the same instructions).

Note that the test case doesn't loop on current master anymore, only
on the LLVM 10 release branch. The issue is already mitigated on master
due to worklist order fixes, but we should fix the root cause there as well.

As a side note, we should probably assert in combineLoadToNewType()
that it does not combine to the same type. Not doing this here, because
this assertion would also be triggered in another place right now.

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

(cherry picked from commit 23db9724d0e5490fa5a2a726acf015f84e2c87cf)




More information about the All-commits mailing list