[PATCH] D26391: [JumpThreading] Unfold selects that depend on the same condition
    Pablo Barrio via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov  8 05:00:22 PST 2016
    
    
  
pbarrio added a comment.
Hi @sebpop, @rengolin,
Could you review this patch to JumpThreading? This is an update to D25477 <https://reviews.llvm.org/D25477>, which was reverted two weeks ago as it was breaking LNT and some bootstrap buildbots.
The problem was that an instruction that is used by selects as the condition can be also used as the true or false value. This made the old code insert the "user" select instruction twice in the list of candidates for expansion. When we traversed that list, the instruction was therefore processed twice, but the second time it didn't exist anymore because it had been expanded already into an if-then-else.
The fix is to remove duplicates in the vector of select instructions with sort+unique. A second test has also been added.
https://reviews.llvm.org/D26391
    
    
More information about the llvm-commits
mailing list