46 lines · plain
1; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s2; RUN: llc < %s -mtriple=ve -mattr=-vpu | FileCheck --check-prefix=SCALAR %s3 4; Check vector and scalar code generation for vector load instruction.5; For the case of vector, generates vst with 4 vector length. For the6; case of scalar, generates 2 stores of 8 bytes length.7 8; This is taken from a ticket below.9; https://github.com/llvm/llvm-project/issues/6442010 11; CHECK-LABEL: func:12; CHECK: # %bb.1:13; CHECK-NEXT: lea %s1, 25614; CHECK-NEXT: lvl %s115; CHECK-NEXT: vbrd %v0, 016; CHECK-NEXT: or %s1, 4, (0)117; CHECK-NEXT: lvl %s118; CHECK-NEXT: vstl %v0, 4, %s019; CHECK-NEXT: b.l.t (, %s10)20 21; SCALAR-LABEL: func:22; SCALAR: # %bb.1:23; SCALAR: or %s1, 0, (0)124; SCALAR-NEXT: st %s1, 8(, %s0)25; SCALAR-NEXT: st %s1, (, %s0)26; SCALAR-NEXT: b.l.t (, %s10)27 28; ModuleID = 'bugpoint-reduced-simplified.bc'29source_filename = "test.c"30target datalayout = "e-m:e-i64:64-n32:64-S128-v64:64:64-v128:64:64-v256:64:64-v512:64:64-v1024:64:64-v2048:64:64-v4096:64:64-v8192:64:64-v16384:64:64"31target triple = "ve-unknown-linux-gnu"32 33define dso_local void @func(ptr %_0) unnamed_addr #0 {34start:35 br i1 poison, label %bb7, label %panic336 37bb7: ; preds = %start38 store <4 x i32> zeroinitializer, ptr %_0, align 439 ret void40 41panic3: ; preds = %start42 unreachable43}44 45attributes #0 = { "target-features"="+vpu" }46