brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 36cc0d4 Raw
58 lines · plain
1; RUN: llc -mtriple=hexagon -disable-copyprop < %s | FileCheck %s2; Disable MachineCopyPropagation to expose this opportunity to RDF copy.3 4;5; Check that6;     {7;         r1 = r08;     }9;     {10;         r0 = memw(r1 + #0)11;     }12; was copy-propagated to13;     {14;         r1 = r015;         r0 = memw(r0 + #0)16;     }17;18; CHECK-LABEL: LBB0_119; CHECK: [[DST:r[0-9]+]] = [[SRC:r[0-9]+]]20; CHECK-DAG: memw([[SRC]]21; CHECK-NOT: memw([[DST]]22; CHECK: %if.end23 24target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"25target triple = "hexagon"26 27%union.t = type { %struct.t, [64 x i8] }28%struct.t = type { [12 x i8], ptr, double }29%struct.r = type opaque30 31define ptr @foo(ptr %chain) nounwind readonly #0 {32entry:33  %tobool = icmp eq ptr %chain, null34  br i1 %tobool, label %if.end, label %while.cond.preheader35 36while.cond.preheader:                             ; preds = %entry37  br label %while.cond38 39while.cond:                                       ; preds = %while.cond.preheader, %while.cond40  %chain.addr.0 = phi ptr [ %0, %while.cond ], [ %chain, %while.cond.preheader ]41  %0 = load ptr, ptr %chain.addr.0, align 4, !tbaa !042  %tobool2 = icmp eq ptr %0, null43  br i1 %tobool2, label %if.end.loopexit, label %while.cond44 45if.end.loopexit:                                  ; preds = %while.cond46  br label %if.end47 48if.end:                                           ; preds = %if.end.loopexit, %entry49  %chain.addr.1 = phi ptr [ null, %entry ], [ %chain.addr.0, %if.end.loopexit ]50  ret ptr %chain.addr.151}52 53attributes #0 = { nounwind "target-features"="-packets" }54 55!0 = !{!"any pointer", !1}56!1 = !{!"omnipotent char", !2}57!2 = !{!"Simple C/C++ TBAA"}58