1 ; RUN: llc -march=hexagon -disable-copyprop < %s | FileCheck %s
2 ; Disable MachineCopyPropagation to expose this opportunity to RDF copy.
12 ; was copy-propagated to
19 ; CHECK: [[DST:r[0-9]+]] = [[SRC:r[0-9]+]]
20 ; CHECK-DAG: memw([[SRC]]
21 ; CHECK-NOT: memw([[DST]]
24 target 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"
25 target triple = "hexagon"
27 %union.t = type { %struct.t, [64 x i8] }
28 %struct.t = type { [12 x i8], ptr, double }
29 %struct.r = type opaque
31 define ptr @foo(ptr %chain) nounwind readonly #0 {
33 %tobool = icmp eq ptr %chain, null
34 br i1 %tobool, label %if.end, label %while.cond.preheader
36 while.cond.preheader: ; preds = %entry
39 while.cond: ; preds = %while.cond.preheader, %while.cond
40 %chain.addr.0 = phi ptr [ %0, %while.cond ], [ %chain, %while.cond.preheader ]
41 %0 = load ptr, ptr %chain.addr.0, align 4, !tbaa !0
42 %tobool2 = icmp eq ptr %0, null
43 br i1 %tobool2, label %if.end.loopexit, label %while.cond
45 if.end.loopexit: ; preds = %while.cond
48 if.end: ; preds = %if.end.loopexit, %entry
49 %chain.addr.1 = phi ptr [ null, %entry ], [ %chain.addr.0, %if.end.loopexit ]
53 attributes #0 = { nounwind "target-features"="-packets" }
55 !0 = !{!"any pointer", !1}
56 !1 = !{!"omnipotent char", !2}
57 !2 = !{!"Simple C/C++ TBAA"}