[PATCH] D52306: [DAGCombine] Don't fold dependent loads across SELECT_CC.

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 20 10:37:06 PDT 2018


bjope added a comment.

In https://reviews.llvm.org/D52306#1240579, @niravd wrote:

> Do you have a test case?


Bevin and I have only been able to reproduce this for an out-of-tree target.

I think the problem is similar to the one fixed in this commit (which is the commit that is introducing the code that Bevin is hoisting out from the if-else):

  commit 1c5bf3f429927c31b9ffc1308ea1ada7a58ee1c0
  Author: Nadav Rotem <nrotem at apple.com>
  Date:   Thu Oct 18 18:06:48 2012 +0000
  
      In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.
      
      rdar://12513091
          
      git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166196 91177308-0d34-0410-b5e6-96231b3b80d8

That commit added a test case for the SELECT situation (test/CodeGen/X86/2012-10-18-crash-dagco.ll). But I don't know how to modify that test case into using SELECT_CC instead (and the same goes for out out-of-tree-target reproducer).

Maybe you have some bright ideas on how to for example convert the test above into using SELECT_CC instead of SELECT?
(note that I haven't verifier if that old tc from 2012 still ends up in this part of DAG combine)


Repository:
  rL LLVM

https://reviews.llvm.org/D52306





More information about the llvm-commits mailing list