brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 189186b Raw
36 lines · plain
1; RUN: opt -S -loop-unroll -codegenprepare < %s | FileCheck %s2 3target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"4target triple = "armv7--linux-gnueabihf"5 6; CHECK-LABEL: @f7define i32 @f(i32 %a) {8; CHECK: call i32 @llvm.bitreverse.i329entry:10  br label %for.body11 12for.cond.cleanup:                                 ; preds = %for.body13  ret i32 %or14 15for.body:                                         ; preds = %for.body, %entry16  %i.08 = phi i32 [ 0, %entry ], [ %inc, %for.body ]17  %b.07 = phi i32 [ 0, %entry ], [ %or, %for.body ]18  %shr = lshr i32 %a, %i.0819  %and = and i32 %shr, 120  %sub = sub nuw nsw i32 31, %i.0821  %shl = shl i32 %and, %sub22  %or = or i32 %shl, %b.0723  %inc = add nuw nsw i32 %i.08, 124  %exitcond = icmp eq i32 %inc, 3225  br i1 %exitcond, label %for.cond.cleanup, label %for.body, !llvm.loop !326}27 28!llvm.module.flags = !{!0, !1}29!llvm.ident = !{!2}30 31!0 = !{i32 1, !"wchar_size", i32 4}32!1 = !{i32 1, !"min_enum_size", i32 4}33!2 = !{!"clang version 3.8.0"}34!3 = distinct !{!3, !4}35!4 = !{!"llvm.loop.unroll.full"}36