brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 630ddc5 Raw
65 lines · plain
1; Test that double word post increment load is not generated.2; REQUIRES: asserts3 4; REQUIRES: asserts5; RUN: llc -mtriple=hexagon -O2 -debug-only=hexagon-load-store-widening \6; RUN:      %s -o 2>&1 - | FileCheck %s7 8; Loads with positive invalid postinc is not widened9define ptr @test1() {10; CHECK-LABEL: test111; CHECK-NOT: memd(r{{[0-9]+}}++12entry:13  %0 = load ptr, ptr null, align 414  %b = getelementptr i8, ptr %0, i32 2015  %1 = load i32, ptr %0, align 816  %c = getelementptr i8, ptr %0, i32 417  %2 = load i32, ptr %c, align 418  %call55 = call i8 @foo(ptr %b, i32 %1, i32 %2)19  ret ptr null20}21 22; Loads with negative invalid postinc is not widened23define ptr @test2() {24; CHECK-LABEL: test225; CHECK-NOT: memd(r{{[0-9]+}}++26entry:27  %0 = load ptr, ptr null, align 428  %b = getelementptr i8, ptr %0, i32 -2029  %1 = load i32, ptr %0, align 830  %c = getelementptr i8, ptr %0, i32 431  %2 = load i32, ptr %c, align 432  %call55 = call i8 @foo(ptr %b, i32 %1, i32 %2)33  ret ptr null34}35 36; Loads with valid positive postinc is widened37define ptr @test3() {38; CHECK-LABEL: test339; CHECK: memd40entry:41  %0 = load ptr, ptr null, align 442  %b = getelementptr i8, ptr %0, i32 2443  %1 = load i32, ptr %0, align 844  %c = getelementptr i8, ptr %0, i32 445  %2 = load i32, ptr %c, align 446  %call55 = call i8 @foo(ptr %b, i32 %1, i32 %2)47  ret ptr null48}49 50; Loads with valid negative postinc is widened51define ptr @test4() {52; CHECK-LABEL: test453; CHECK: memd54entry:55  %0 = load ptr, ptr null, align 456  %b = getelementptr i8, ptr %0, i32 -2457  %1 = load i32, ptr %0, align 858  %c = getelementptr i8, ptr %0, i32 459  %2 = load i32, ptr %c, align 460  %call55 = call i8 @foo(ptr %b, i32 %1, i32 %2)61  ret ptr null62}63 64declare i8 @foo(ptr, i32, i32)65