51 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3; CHECK-DAG: r[[BASE:[0-9]+]] = add(r1,#1000)4; CHECK-DAG: r[[IDX0:[0-9]+]] = add(r2,#5)5; CHECK-DAG: r[[IDX1:[0-9]+]] = add(r2,#6)6; CHECK-DAG: memw(r0+r[[IDX0]]<<#2) = r37; CHECK-DAG: memw(r0+r[[IDX1]]<<#2) = r38; CHECK-DAG: memw(r[[BASE]]+r[[IDX0]]<<#2) = r[[IDX0]]9; CHECK-DAG: memw(r[[BASE]]+r[[IDX1]]<<#2) = r[[IDX0]]10 11target triple = "hexagon"12 13@G = external global i32, align 414 15; Function Attrs: norecurse nounwind16define void @fred(ptr nocapture %A, ptr nocapture %B, i32 %N, i32 %M) #0 {17entry:18 %add = add nsw i32 %N, 519 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add20 store i32 %M, ptr %arrayidx, align 4, !tbaa !121 %add2 = add nsw i32 %N, 622 %arrayidx3 = getelementptr inbounds i32, ptr %A, i32 %add223 store i32 %M, ptr %arrayidx3, align 4, !tbaa !124 %add4 = add nsw i32 %N, 3525 %arrayidx5 = getelementptr inbounds i32, ptr %A, i32 %add426 store i32 %add, ptr %arrayidx5, align 4, !tbaa !127 %arrayidx8 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %add28 store i32 %add, ptr %arrayidx8, align 4, !tbaa !129 %inc = add nsw i32 %N, 630 %arrayidx8.1 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %inc31 store i32 %add, ptr %arrayidx8.1, align 4, !tbaa !132 %sub = add nsw i32 %N, 433 %arrayidx10 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %sub34 %0 = load i32, ptr %arrayidx10, align 4, !tbaa !135 %add11 = add nsw i32 %0, 136 store i32 %add11, ptr %arrayidx10, align 4, !tbaa !137 %1 = load i32, ptr %arrayidx, align 4, !tbaa !138 %add13 = add nsw i32 %N, 2539 %arrayidx15 = getelementptr inbounds [50 x i32], ptr %B, i32 %add13, i32 %add40 store i32 %1, ptr %arrayidx15, align 4, !tbaa !141 store i32 5, ptr @G, align 4, !tbaa !142 ret void43}44 45attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }46 47!1 = !{!2, !2, i64 0}48!2 = !{!"int", !3, i64 0}49!3 = !{!"omnipotent char", !4, i64 0}50!4 = !{!"Simple C/C++ TBAA"}51