brintos

brintos / llvm-project-archived public Read only

0
0
Text · 959 B · 789e9c0 Raw
27 lines · plain
1target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"2 3; RUN: opt < %s -S -passes=loop-vectorize -debug-only=loop-vectorize --disable-output 2>&1 | FileCheck %s4; REQUIRES: asserts5; CHECK: LV: Can't vectorize due to memory conflicts6 7define void @test_loop_novect(ptr %arr, i64 %n) {8for.body.lr.ph:9  %t = load ptr, ptr %arr, align 810  br label %for.body11 12for.body:                                      ; preds = %for.body, %for.body.lr.ph13  %i = phi i64 [ 0, %for.body.lr.ph ], [ %i.next, %for.body ]14  %a = getelementptr inbounds double, ptr %t, i64 %i15  %i.next = add nuw nsw i64 %i, 116  %a.next = getelementptr inbounds double, ptr %t, i64 %i.next17  %t1 = load double, ptr %a, align 818  %t2 = load double, ptr %a.next, align 819  store double %t1, ptr %a.next, align 820  store double %t2, ptr %a, align 821  %c = icmp eq i64 %i, %n22  br i1 %c, label %final, label %for.body23 24final:                                   ; preds = %for.body25  ret void26}27