-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Labels
Description
Reproducer:
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@j = global i32 0
@r = global ptr @j
@i = global i1 false
@.str = constant [4 x i8] c"%d\0A\00"
define i32 @main() {
entry:
%0 = icmp eq i8 0, 0
br i1 %0, label %for.body.i.i, label %n.exit.i
for.body.i.i: ; preds = %entry
store i1 true, ptr @i, align 4
br label %n.exit.i
n.exit.i: ; preds = %for.body.i.i, %entry
%1 = load ptr, ptr @r, align 8
%2 = load i1, ptr @i, align 4
%broadcast.splatinsert2 = insertelement <4 x i1> zeroinitializer, i1 %2, i64 0
%3 = xor <4 x i1> %broadcast.splatinsert2, splat (i1 true)
%not.broadcast.splat3 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <4 x i32> zeroinitializer
%4 = zext <4 x i1> %not.broadcast.splat3 to <4 x i32>
%5 = extractelement <4 x i32> %4, i64 0
%6 = extractelement <4 x i32> %4, i64 1
br label %vector.body
vector.body: ; preds = %vector.body, %n.exit.i
%spec.select = select i1 false, i32 0, i32 %5
store i32 %6, ptr %1, align 4
%7 = icmp eq i32 0, 0
br i1 %7, label %o.exit, label %vector.body
o.exit: ; preds = %vector.body
%8 = load i32, ptr @j, align 4
%call1 = tail call i32 (ptr, ...) @printf(ptr @.str, i32 %8)
ret i32 0
}
declare i32 @printf(ptr, ...)
> bin/llubi reduced.ll
0
> bin/lli reduced.ll
1
llvm version: ece10a6