44 lines · plain
1; RUN: llc -mtriple=hexagon -disable-hsdr -enable-subreg-liveness < %s | FileCheck %s2; Check that we don't generate any bitwise operations.3 4; CHECK-NOT: = or(5; CHECK-NOT: = and(6 7target triple = "hexagon"8 9define i32 @fred(ptr nocapture readonly %p, i32 %n) #0 {10entry:11 %t.sroa.0.048 = load i32, ptr %p, align 412 %cmp49 = icmp ugt i32 %n, 113 br i1 %cmp49, label %for.body, label %for.end14 15for.body: ; preds = %entry, %for.body16 %t.sroa.0.052 = phi i32 [ %t.sroa.0.0, %for.body ], [ %t.sroa.0.048, %entry ]17 %t.sroa.11.051 = phi i64 [ %t.sroa.11.0.extract.shift, %for.body ], [ 0, %entry ]18 %i.050 = phi i32 [ %inc, %for.body ], [ 1, %entry ]19 %t.sroa.0.0.insert.ext = zext i32 %t.sroa.0.052 to i6420 %t.sroa.0.0.insert.insert = or i64 %t.sroa.0.0.insert.ext, %t.sroa.11.05121 %0 = tail call i64 @llvm.hexagon.A2.addp(i64 %t.sroa.0.0.insert.insert, i64 %t.sroa.0.0.insert.insert)22 %t.sroa.11.0.extract.shift = and i64 %0, -429496729623 %arrayidx4 = getelementptr inbounds i32, ptr %p, i32 %i.05024 %inc = add nuw i32 %i.050, 125 %t.sroa.0.0 = load i32, ptr %arrayidx4, align 426 %exitcond = icmp eq i32 %inc, %n27 br i1 %exitcond, label %for.end, label %for.body28 29for.end: ; preds = %for.body, %entry30 %t.sroa.0.0.lcssa = phi i32 [ %t.sroa.0.048, %entry ], [ %t.sroa.0.0, %for.body ]31 %t.sroa.11.0.lcssa = phi i64 [ 0, %entry ], [ %t.sroa.11.0.extract.shift, %for.body ]32 %t.sroa.0.0.insert.ext17 = zext i32 %t.sroa.0.0.lcssa to i6433 %t.sroa.0.0.insert.insert19 = or i64 %t.sroa.0.0.insert.ext17, %t.sroa.11.0.lcssa34 %1 = tail call i64 @llvm.hexagon.A2.addp(i64 %t.sroa.0.0.insert.insert19, i64 %t.sroa.0.0.insert.insert19)35 %t.sroa.11.0.extract.shift41 = lshr i64 %1, 3236 %t.sroa.11.0.extract.trunc42 = trunc i64 %t.sroa.11.0.extract.shift41 to i3237 ret i32 %t.sroa.11.0.extract.trunc4238}39 40declare i64 @llvm.hexagon.A2.addp(i64, i64) #141 42attributes #0 = { norecurse nounwind readonly }43attributes #1 = { nounwind readnone }44