1 ; RUN: llc -march=hexagon < %s | FileCheck %s
10 ; was copy-propagated to
17 ; CHECK: [[DST:r[0-9]+]] = [[SRC:r[0-9]+]]
18 ; CHECK-DAG: memw([[SRC]]
19 ; CHECK-NOT: memw([[DST]]
22 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"
23 target triple = "hexagon"
25 %union.t = type { %struct.t, [64 x i8] }
26 %struct.t = type { [12 x i8], ptr, double }
27 %struct.r = type opaque
29 define ptr @foo(ptr %chain) nounwind readonly {
31 %tobool = icmp eq ptr %chain, null
32 br i1 %tobool, label %if.end, label %while.cond.preheader
34 while.cond.preheader: ; preds = %entry
37 while.cond: ; preds = %while.cond.preheader, %while.cond
38 %chain.addr.0 = phi ptr [ %0, %while.cond ], [ %chain, %while.cond.preheader ]
39 %0 = load ptr, ptr %chain.addr.0, align 4, !tbaa !0
40 %tobool2 = icmp eq ptr %0, null
41 br i1 %tobool2, label %if.end.loopexit, label %while.cond
43 if.end.loopexit: ; preds = %while.cond
46 if.end: ; preds = %if.end.loopexit, %entry
47 %chain.addr.1 = phi ptr [ null, %entry ], [ %chain.addr.0, %if.end.loopexit ]
51 !0 = !{!"any pointer", !1}
52 !1 = !{!"omnipotent char", !2}
53 !2 = !{!"Simple C/C++ TBAA"}