[test][SLPVectorizer][OpaquePtr] Precommit test

This commit is contained in:
Arthur Eubanks 2022-02-16 14:26:58 -08:00
parent b171583ae7
commit 4e24397805
1 changed files with 24 additions and 0 deletions

View File

@ -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> <i64 -1, i64 128>
; 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
}