[llvm] r310510 - [SimplifyCFG] remove checks for crasher test from r310481
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 12:42:18 PDT 2017
The IR difference is real - it seems to depend on whether you're building
debug or release.
This didn't change if I specified triple+layout with:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Here's what I show using a debug build of opt on x86-64 on macOS (note:
different blocks, different phi, etc):
$ ./opt -S ../../llvm/test/Transforms/SimplifyCFG/pr34131.ll -simplifycfg
; ModuleID = '../../llvm/test/Transforms/SimplifyCFG/pr34131.ll'
source_filename = "../../llvm/test/Transforms/SimplifyCFG/pr34131.ll"
define void @patatino() {
bb1:
br i1 undef, label %bb4, label %bb11
bb4: ; preds = %bb6, %bb4, %bb1
%.pr = phi i1 [ undef, %bb4 ], [ true, %bb1 ], [ true, %bb6 ]
br i1 %.pr, label %bb4, label %bb6
bb6: ; preds = %bb4
%tmp = or i64 undef, 1
%tmp8 = icmp ult i64 %tmp, 0
%or.cond = and i1 undef, %tmp8
%tmp13 = icmp ult i64 0, 0
%or.cond2 = and i1 %or.cond, %tmp13
%tmp15 = icmp ult i64 undef, 0
%or.cond3 = and i1 %or.cond2, %tmp15
%tmp19 = or i64 undef, 5
%tmp20 = icmp ult i64 %tmp19, 0
%or.cond4 = and i1 %or.cond3, %tmp20
%tmp22 = or i64 undef, 6
%tmp23 = icmp ult i64 %tmp22, 0
%or.cond5 = and i1 %or.cond4, %tmp23
%tmp25 = or i64 undef, 7
%tmp26 = icmp ult i64 %tmp25, 0
%or.cond6 = and i1 %or.cond5, %tmp26
%tmp28 = or i64 undef, 8
%tmp29 = icmp ult i64 %tmp28, 0
%or.cond7 = and i1 %or.cond6, %tmp29
%or.cond7.not = xor i1 %or.cond7, true
%.not = xor i1 undef, true
%brmerge = or i1 %or.cond7.not, %.not
%.not8 = xor i1 undef, true
%brmerge9 = or i1 %brmerge, %.not8
%.not10 = xor i1 undef, true
%brmerge11 = or i1 %brmerge9, %.not10
%.not12 = xor i1 undef, true
%brmerge13 = or i1 %brmerge11, %.not12
%.not14 = xor i1 undef, true
%brmerge15 = or i1 %brmerge13, %.not14
%.not16 = xor i1 undef, true
%brmerge17 = or i1 %brmerge15, %.not16
%.not18 = xor i1 undef, true
%brmerge19 = or i1 %brmerge17, %.not18
%.not20 = xor i1 undef, true
%brmerge21 = or i1 %brmerge19, %.not20
br i1 %brmerge21, label %bb11, label %bb4
bb11: ; preds = %bb6, %bb1
ret void
}
On Wed, Aug 9, 2017 at 1:09 PM, Davide Italiano <davide at freebsd.org> wrote:
> On Wed, Aug 9, 2017 at 11:56 AM, Sanjay Patel via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: spatel
> > Date: Wed Aug 9 11:56:26 2017
> > New Revision: 310510
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=310510&view=rev
> > Log:
> > [SimplifyCFG] remove checks for crasher test from r310481
> >
> > Not sure why the earlier version would fail, but trying to get the bots
> > (and my local machine) to pass again.
>
> I suspect a bug in lit or filecheck, FWIW.
> How does your IR look like? Is it different from this one?
>
> $ ./opt -simplifycfg -S -o - blah.ll
>
> define void @patatino() {
> br label %bb1
>
> bb1: ; preds = %bb6, %0
> br i1 undef, label %bb4, label %bb9.critedge
>
> bb4: ; preds = %bb4, %bb1
> %.pr = phi i1 [ undef, %bb4 ], [ true, %bb1 ]
> br i1 %.pr, label %bb4, label %bb6
>
> bb6: ; preds = %bb4
> %tmp = or i64 undef, 1
> %tmp8 = icmp ult i64 %tmp, 0
> %or.cond = and i1 undef, %tmp8
> %tmp13 = icmp ult i64 0, 0
> %or.cond2 = and i1 %or.cond, %tmp13
> %tmp15 = icmp ult i64 undef, 0
> %or.cond3 = and i1 %or.cond2, %tmp15
> %tmp19 = or i64 undef, 5
> %tmp20 = icmp ult i64 %tmp19, 0
> %or.cond4 = and i1 %or.cond3, %tmp20
> %tmp22 = or i64 undef, 6
> %tmp23 = icmp ult i64 %tmp22, 0
> %or.cond5 = and i1 %or.cond4, %tmp23
> %tmp25 = or i64 undef, 7
> %tmp26 = icmp ult i64 %tmp25, 0
> %or.cond6 = and i1 %or.cond5, %tmp26
> %tmp28 = or i64 undef, 8
> %tmp29 = icmp ult i64 %tmp28, 0
> %or.cond7 = and i1 %or.cond6, %tmp29
> %or.cond7.not = xor i1 %or.cond7, true
> %.not = xor i1 undef, true
> %brmerge = or i1 %or.cond7.not, %.not
> %.not8 = xor i1 undef, true
> %brmerge9 = or i1 %brmerge, %.not8
> %.not10 = xor i1 undef, true
> %brmerge11 = or i1 %brmerge9, %.not10
> %.not12 = xor i1 undef, true
> %brmerge13 = or i1 %brmerge11, %.not12
> %.not14 = xor i1 undef, true
> %brmerge15 = or i1 %brmerge13, %.not14
> %.not16 = xor i1 undef, true
> %brmerge17 = or i1 %brmerge15, %.not16
> %.not18 = xor i1 undef, true
> %brmerge19 = or i1 %brmerge17, %.not18
> br i1 %brmerge19, label %bb11, label %bb1
>
> bb9.critedge: ; preds = %bb1
> br label %bb11
>
> bb11: ; preds = %bb6,
> %bb9.critedge
> ret void
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170809/2fa77cda/attachment.html>
More information about the llvm-commits
mailing list