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

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Feb 8 07:55:36 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 23db9724d0e5490fa5a2a726acf015f84e2c87cf
      https://github.com/llvm/llvm-project/commit/23db9724d0e5490fa5a2a726acf015f84e2c87cf
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-08 (Sat, 08 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




More information about the All-commits mailing list