[PATCH] D76153: [SimplifyCFG] try branch-to-branch simplification sooner

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 14 08:01:21 PDT 2020


spatel added a subscriber: regehr.
spatel added a comment.

In D76153#1922761 <https://reviews.llvm.org/D76153#1922761>, @aqjune wrote:

> As you concerned, in theory the transformation may introduce more undefinedness in target: http://volta.cs.utah.edu:8080/z/wygrrr
>  (Right now there was a slight issue with vector function input in Alive2 so I unpacked it into individual scalar inputs)
>  I think converting it into select rather than and/or is a safer approach. It clearly preserves which condition should be considered first.


Thanks - and very grateful for the online alive2 explorer! cc @regehr 
That's going to be fun. :)

So we have a chain of bugs here...

1. SimplifyCFG can directly turn branches into logic - creates more poison.
2. SimplifyCFG can turn branches into select - this is ok by itself, but...
3. InstCombine turns those selects into logic as seen in https://reviews.llvm.org/D72396#1810460

I need to review 'freeze'...and see what (if anything) can be done.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76153/new/

https://reviews.llvm.org/D76153





More information about the llvm-commits mailing list