alive2.llvm.org/ce/z/FD-XxA
Preview meta tags from the alive2.llvm.org website.
Linked Hostnames
9- 5 links togithub.com
- 2 links toxania.org
- 1 link toalive2.llvm.org
- 1 link tocppinsights.io
- 1 link togodbolt.org
- 1 link togroups.google.com
- 1 link toquick-bench.com
- 1 link towww.patreon.com
Thumbnail

Search Engine Appearance
Compiler Explorer - LLVM IR (alive-tv)
; No interleaving with freeze, verifies. define noundef i8 @src2(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt2(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %f = freeze <4 x i1> %4 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %f) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; No interleaving without freeze, fails to verify. define noundef i8 @src3(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt3(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %4) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version with freeze, verifies. define noundef i8 @src(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %6 = freeze <4 x i1> %4 %7 = freeze <4 x i1> %5 %8 = or <4 x i1> %6, %7 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version without freeze, fails to verify. define noundef i8 @src1(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt1(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %8 = or <4 x i1> %4, %5 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res }
Bing
Compiler Explorer - LLVM IR (alive-tv)
; No interleaving with freeze, verifies. define noundef i8 @src2(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt2(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %f = freeze <4 x i1> %4 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %f) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; No interleaving without freeze, fails to verify. define noundef i8 @src3(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt3(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %4) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version with freeze, verifies. define noundef i8 @src(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %6 = freeze <4 x i1> %4 %7 = freeze <4 x i1> %5 %8 = or <4 x i1> %6, %7 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version without freeze, fails to verify. define noundef i8 @src1(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt1(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %8 = or <4 x i1> %4, %5 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res }
DuckDuckGo
Compiler Explorer - LLVM IR (alive-tv)
; No interleaving with freeze, verifies. define noundef i8 @src2(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt2(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %f = freeze <4 x i1> %4 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %f) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; No interleaving without freeze, fails to verify. define noundef i8 @src3(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt3(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %4) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version with freeze, verifies. define noundef i8 @src(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %6 = freeze <4 x i1> %4 %7 = freeze <4 x i1> %5 %8 = or <4 x i1> %6, %7 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version without freeze, fails to verify. define noundef i8 @src1(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt1(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %8 = or <4 x i1> %4, %5 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res }
General Meta Tags
9- titleCompiler Explorer
- charsetutf-8
- viewportwidth=device-width, initial-scale=1.0, user-scalable=no, shrink-to-fit=no
- X-UA-CompatibleIE=edge
- description; No interleaving with freeze, verifies. define noundef i8 @src2(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt2(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %f = freeze <4 x i1> %4 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %f) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; No interleaving without freeze, fails to verify. define noundef i8 @src3(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt3(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %4) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version with freeze, verifies. define noundef i8 @src(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %6 = freeze <4 x i1> %4 %7 = freeze <4 x i1> %5 %8 = or <4 x i1> %6, %7 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version without freeze, fails to verify. define noundef i8 @src1(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt1(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %8 = or <4 x i1> %4, %5 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res }
Open Graph Meta Tags
7- og:titleCompiler Explorer - LLVM IR (alive-tv)
- og:description; No interleaving with freeze, verifies. define noundef i8 @src2(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt2(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %f = freeze <4 x i1> %4 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %f) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; No interleaving without freeze, fails to verify. define noundef i8 @src3(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 4 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 4 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt3(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %4 = icmp ne <4 x i8> %2, zeroinitializer %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %4) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version with freeze, verifies. define noundef i8 @src(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %6 = freeze <4 x i1> %4 %7 = freeze <4 x i1> %5 %8 = or <4 x i1> %6, %7 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res } ; Interleaved version without freeze, fails to verify. define noundef i8 @src1(i8 noundef %g) { entry: br label %loop.header loop.header: %iv = phi i8 [ 0, %entry ], [ %iv.next, %loop.latch ] %mul = shl nuw nsw i8 %iv, 3 %shr = ashr i8 %g, %mul %early.cond = icmp eq i8 %shr, 0 br i1 %early.cond, label %loop.latch, label %return loop.latch: %iv.next = add nuw nsw i8 %iv, 1 %ec = icmp eq i8 %iv.next, 8 br i1 %ec, label %return, label %loop.header return: %res = phi i8 [ 0, %loop.latch ], [ 1, %loop.header ] ret i8 %res } define noundef i8 @tgt1(i8 noundef %g) { entry: %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %g, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %step.add = add <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 4) %0 = shl nuw nsw <4 x i8> <i8 0, i8 1, i8 2, i8 3>, splat (i8 3) %1 = shl nuw nsw <4 x i8> %step.add, splat (i8 3) %2 = ashr <4 x i8> %broadcast.splat, %0 %3 = ashr <4 x i8> %broadcast.splat, %1 %4 = icmp ne <4 x i8> %2, zeroinitializer %5 = icmp ne <4 x i8> %3, zeroinitializer %8 = or <4 x i1> %4, %5 %9 = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %8) %vec.ind.next = add <4 x i8> %step.add, splat (i8 4) %res = select i1 %9, i8 1, i8 0 ret i8 %res }
- og:imagehttps://github.com/compiler-explorer/infra/blob/master/logo/favicon.png?raw=true
- og:image:secure_urlhttps://github.com/compiler-explorer/infra/blob/master/logo/favicon.png?raw=true
- og:image:typeimage/png
Twitter Meta Tags
2- twitter:cardsummary
- twitter:site@CompileExplore
Link Tags
2- iconfavicon.ico?v=1
- stylesheet/ce/static/main.abe7d822377e6b2f47ac.css
Emails
1Links
14- http://quick-bench.com
- https://alive2.llvm.org/ce
- https://cppinsights.io
- https://github.com/compiler-explorer/compiler-explorer
- https://github.com/compiler-explorer/compiler-explorer/issues