[llvm] c071dba - [LV] update hexagon test to use load results.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 12:21:20 PDT 2023
Author: Florian Hahn
Date: 2023-08-22T20:20:58+01:00
New Revision: c071dba1a3aad827789babb51c9f17845c925be0
URL: https://github.com/llvm/llvm-project/commit/c071dba1a3aad827789babb51c9f17845c925be0
DIFF: https://github.com/llvm/llvm-project/commit/c071dba1a3aad827789babb51c9f17845c925be0.diff
LOG: [LV] update hexagon test to use load results.
The current version of the test doesn't use any of the loads, so they
can be removed together with the mask of the interleave group.
Use some loaded values and store them, to prevent the mask from being
optimized away.
Added:
Modified:
llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll b/llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll
index de3dac08b1503a..725158b747c793 100644
--- a/llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll
+++ b/llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll
@@ -20,7 +20,7 @@ target triple = "hexagon"
define void @test1(ptr %arg, i32 %N) #0 {
entry:
- %tmp = alloca i8
+ %tmp = alloca i32
br label %loop
loop: ; preds = %bb2, %bb
@@ -47,7 +47,8 @@ loop: ; preds = %bb2, %bb
%tmp25 = add nuw nsw i32 %idx.start, 6
%tmp26 = getelementptr inbounds i32, ptr %arg, i32 %tmp25
%tmp27 = load i32, ptr %tmp26, align 4
- store i8 0, ptr %tmp, align 1
+ %add = add i32 %tmp7, %tmp27
+ store i32 %add, ptr %tmp, align 1
%iv.next= add nuw nsw i32 %iv, 1
%exit.cond = icmp eq i32 %iv.next, %N
br i1 %exit.cond, label %exit, label %loop
@@ -64,7 +65,7 @@ exit: ; preds = %loop
; CHECK-NOT: load <{{.*}} x i32>
define void @test2(ptr %arg) #1 {
entry:
- %tmp = alloca i8
+ %tmp = alloca i32
br label %loop
loop: ; preds = %bb2, %bb
@@ -81,7 +82,8 @@ loop: ; preds = %bb2, %bb
%tmp14 = add nuw nsw i32 %idx.start, 3
%tmp15 = getelementptr inbounds i32, ptr %arg, i32 %tmp14
%tmp16 = load i32, ptr %tmp15, align 4
- store i8 0, ptr %tmp, align 1
+ %add = add i32 %tmp7, %tmp16
+ store i32 %add, ptr %tmp, align 1
%iv.next= add nuw nsw i32 %iv, 1
%exit.cond = icmp eq i32 %iv.next, 128
br i1 %exit.cond, label %exit, label %loop
More information about the llvm-commits
mailing list