brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 298b59a Raw
100 lines · plain
1; RUN: llc < %s -O3 -mtriple=arm64-unknown-unknown -mcpu=cyclone -pre-RA-sched=list-hybrid | FileCheck %s2; <rdar://problem/11635990> [arm64] [lsr] Inefficient EA/loop-exit calc in bzero_phys3;4; LSR on loop %while.cond should reassociate non-address mode5; expressions at use %cmp16 to avoid sinking computation into %while.body18.6;7; Remove the -pre-RA-sched=list-hybrid option after fixing:8; <rdar://problem/12702735> [ARM64][coalescer] need better register9; coalescing for simple unit tests.10 11; CHECK: @memset12; CHECK: %while.body18{{$}}13; CHECK: str x{{[0-9]+}}, [x{{[0-9]+}}], #814; First set the IVREG variable, then use it15; CHECK-NEXT: sub [[IVREG:x[0-9]+]],16; CHECK: [[IVREG]], #817; CHECK-NEXT: cmp  [[IVREG]], #718; CHECK-NEXT: b.hi19define ptr @memset(ptr %dest, i32 %val, i64 %len) nounwind ssp noimplicitfloat {20entry:21  %cmp = icmp eq i64 %len, 022  br i1 %cmp, label %done, label %while.cond.preheader23 24while.cond.preheader:                             ; preds = %entry25  %conv = trunc i32 %val to i826  br label %while.cond27 28while.cond:                                       ; preds = %while.body, %while.cond.preheader29  %ptr.0 = phi ptr [ %incdec.ptr, %while.body ], [ %dest, %while.cond.preheader ]30  %len.addr.0 = phi i64 [ %dec, %while.body ], [ %len, %while.cond.preheader ]31  %cond = icmp eq i64 %len.addr.0, 032  br i1 %cond, label %done, label %land.rhs33 34land.rhs:                                         ; preds = %while.cond35  %0 = ptrtoint ptr %ptr.0 to i6436  %and = and i64 %0, 737  %cmp5 = icmp eq i64 %and, 038  br i1 %cmp5, label %if.end9, label %while.body39 40while.body:                                       ; preds = %land.rhs41  %incdec.ptr = getelementptr inbounds i8, ptr %ptr.0, i64 142  store i8 %conv, ptr %ptr.0, align 1, !tbaa !043  %dec = add i64 %len.addr.0, -144  br label %while.cond45 46if.end9:                                          ; preds = %land.rhs47  %conv.mask = and i32 %val, 25548  %1 = zext i32 %conv.mask to i6449  %2 = shl nuw nsw i64 %1, 850  %ins18 = or i64 %2, %151  %3 = shl nuw nsw i64 %1, 1652  %ins15 = or i64 %ins18, %353  %4 = shl nuw nsw i64 %1, 2454  %5 = shl nuw nsw i64 %1, 3255  %mask8 = or i64 %ins15, %456  %6 = shl nuw nsw i64 %1, 4057  %mask5 = or i64 %mask8, %558  %7 = shl nuw nsw i64 %1, 4859  %8 = shl nuw i64 %1, 5660  %mask2.masked = or i64 %mask5, %661  %mask = or i64 %mask2.masked, %762  %ins = or i64 %mask, %863  %cmp1636 = icmp ugt i64 %len.addr.0, 764  br i1 %cmp1636, label %while.body18, label %while.body29.lr.ph65 66while.body18:                                     ; preds = %if.end9, %while.body1867  %wideptr.038 = phi ptr [ %incdec.ptr19, %while.body18 ], [ %ptr.0, %if.end9 ]68  %len.addr.137 = phi i64 [ %sub, %while.body18 ], [ %len.addr.0, %if.end9 ]69  %incdec.ptr19 = getelementptr inbounds i64, ptr %wideptr.038, i64 170  store i64 %ins, ptr %wideptr.038, align 8, !tbaa !271  %sub = add i64 %len.addr.137, -872  %cmp16 = icmp ugt i64 %sub, 773  br i1 %cmp16, label %while.body18, label %while.end2074 75while.end20:                                      ; preds = %while.body1876  %cmp21 = icmp eq i64 %sub, 077  br i1 %cmp21, label %done, label %while.body29.lr.ph78 79while.body29.lr.ph:                               ; preds = %while.end20, %if.end980  %len.addr.1.lcssa49 = phi i64 [ %sub, %while.end20 ], [ %len.addr.0, %if.end9 ]81  %wideptr.0.lcssa48 = phi ptr [ %incdec.ptr19, %while.end20 ], [ %ptr.0, %if.end9 ]82  br label %while.body2983 84while.body29:                                     ; preds = %while.body29, %while.body29.lr.ph85  %len.addr.235 = phi i64 [ %len.addr.1.lcssa49, %while.body29.lr.ph ], [ %dec26, %while.body29 ]86  %ptr.134 = phi ptr [ %wideptr.0.lcssa48, %while.body29.lr.ph ], [ %incdec.ptr31, %while.body29 ]87  %dec26 = add i64 %len.addr.235, -188  %incdec.ptr31 = getelementptr inbounds i8, ptr %ptr.134, i64 189  store i8 %conv, ptr %ptr.134, align 1, !tbaa !090  %cmp27 = icmp eq i64 %dec26, 091  br i1 %cmp27, label %done, label %while.body2992 93done:                                             ; preds = %while.cond, %while.body29, %while.end20, %entry94  ret ptr %dest95}96 97!0 = !{!"omnipotent char", !1}98!1 = !{!"Simple C/C++ TBAA"}99!2 = !{!"long long", !0}100