alive2.llvm.org/ce/z/FD-XxA

Preview meta tags from the alive2.llvm.org website.

Linked Hostnames

9

Thumbnail

Search Engine Appearance

Google

https://alive2.llvm.org/ce/z/FD-XxA

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)

https://alive2.llvm.org/ce/z/FD-XxA

; 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

https://alive2.llvm.org/ce/z/FD-XxA

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
    • title
      Compiler Explorer
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1.0, user-scalable=no, shrink-to-fit=no
    • X-UA-Compatible
      IE=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:title
      Compiler 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:image
      https://github.com/compiler-explorer/infra/blob/master/logo/favicon.png?raw=true
    • og:image:secure_url
      https://github.com/compiler-explorer/infra/blob/master/logo/favicon.png?raw=true
    • og:image:type
      image/png
  • Twitter Meta Tags

    2
    • twitter:card
      summary
    • twitter:site
      @CompileExplore
  • Link Tags

    2
    • icon
      favicon.ico?v=1
    • stylesheet
      /ce/static/main.abe7d822377e6b2f47ac.css

Emails

1

Links

14