From: Arthur Eubanks Date: Wed, 16 Feb 2022 22:26:58 +0000 (-0800) Subject: [test][SLPVectorizer][OpaquePtr] Precommit test X-Git-Tag: upstream/15.0.7~16175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e24397805ebfef7b3098e36e568ea576473efa1;p=platform%2Fupstream%2Fllvm.git [test][SLPVectorizer][OpaquePtr] Precommit test --- diff --git a/llvm/test/Transforms/SLPVectorizer/X86/opaque-ptr-2.ll b/llvm/test/Transforms/SLPVectorizer/X86/opaque-ptr-2.ll new file mode 100644 index 0000000..a2c7f1d --- /dev/null +++ b/llvm/test/Transforms/SLPVectorizer/X86/opaque-ptr-2.ll @@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt -S -slp-vectorizer -opaque-pointers < %s | FileCheck %s + +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define void @test(ptr %arg, ptr %arg1, ptr %arg2) { +; CHECK-LABEL: @test( +; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x ptr> poison, ptr [[ARG1:%.*]], i32 0 +; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x ptr> [[TMP1]], ptr [[ARG2:%.*]], i32 1 +; CHECK-NEXT: [[TMP3:%.*]] = getelementptr ptr, <2 x ptr> [[TMP2]], <2 x i64> +; CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds ptr, ptr [[ARG:%.*]], i64 0 +; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds ptr, ptr [[ARG]], i64 1 +; CHECK-NEXT: store <2 x ptr> [[TMP3]], ptr [[TMP4]], align 8 +; CHECK-NEXT: ret void +; + %tmp = getelementptr inbounds i8, ptr %arg2, i64 128 + %tmp3 = getelementptr inbounds ptr, ptr %arg1, i64 -1 + %tmp4 = getelementptr inbounds ptr, ptr %arg, i64 0 + %tmp5 = getelementptr inbounds ptr, ptr %arg, i64 1 + store ptr %tmp3, ptr %tmp4, align 8 + store ptr %tmp, ptr %tmp5, align 8 + ret void +}