Tests exercizing TBAA metadata (both purposefully and not), and previously generated via UTC, have been regenerated and updated to version 6.
63 lines
2.6 KiB
LLVM
63 lines
2.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: opt -passes=slp-vectorizer -S < %s | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
|
|
target triple = "aarch64-unknown-linux-gnu"
|
|
|
|
%S = type { i8, i8, i8, i8 }
|
|
|
|
define ptr @foo(ptr %this, ptr %rhs) {
|
|
; CHECK-LABEL: define ptr @foo(
|
|
; CHECK-SAME: ptr [[THIS:%.*]], ptr [[RHS:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load <4 x i8>, ptr [[RHS]], align 1, !tbaa [[BOOL_TBAA0:![0-9]+]]
|
|
; CHECK-NEXT: [[TMP1:%.*]] = load <4 x i8>, ptr [[THIS]], align 1, !tbaa [[BOOL_TBAA0]]
|
|
; CHECK-NEXT: [[TMP2:%.*]] = or <4 x i8> [[TMP0]], [[TMP1]]
|
|
; CHECK-NEXT: store <4 x i8> [[TMP2]], ptr [[THIS]], align 1, !tbaa [[BOOL_TBAA0]]
|
|
; CHECK-NEXT: ret ptr [[THIS]]
|
|
;
|
|
entry:
|
|
%right1 = load i8, ptr %rhs, align 1, !tbaa !6, !range !11, !noundef !12
|
|
%left1 = load i8, ptr %this, align 1, !tbaa !6, !range !11, !noundef !12
|
|
%res1 = or i8 %right1, %left1
|
|
store i8 %res1, ptr %this, align 1, !tbaa !6
|
|
%b = getelementptr inbounds %S, ptr %rhs, i64 0, i32 1
|
|
%right2 = load i8, ptr %b, align 1, !tbaa !13, !range !11, !noundef !12
|
|
%b8 = getelementptr inbounds %S, ptr %this, i64 0, i32 1
|
|
%left2 = load i8, ptr %b8, align 1, !tbaa !13, !range !11, !noundef !12
|
|
%res2 = or i8 %right2, %left2
|
|
store i8 %res2, ptr %b8, align 1, !tbaa !13
|
|
%c = getelementptr inbounds %S, ptr %rhs, i64 0, i32 2
|
|
%right3 = load i8, ptr %c, align 1, !tbaa !14, !range !11, !noundef !12
|
|
%c16 = getelementptr inbounds %S, ptr %this, i64 0, i32 2
|
|
%left3 = load i8, ptr %c16, align 1, !tbaa !14, !range !11, !noundef !12
|
|
%res3 = or i8 %right3, %left3
|
|
store i8 %res3, ptr %c16, align 1, !tbaa !14
|
|
%d = getelementptr inbounds %S, ptr %rhs, i64 0, i32 3
|
|
%right4 = load i8, ptr %d, align 1, !tbaa !15, !range !11, !noundef !12
|
|
%d24 = getelementptr inbounds %S, ptr %this, i64 0, i32 3
|
|
%left4 = load i8, ptr %d24, align 1, !tbaa !15, !range !11, !noundef !12
|
|
%res4 = or i8 %right4, %left4
|
|
store i8 %res4, ptr %d24, align 1, !tbaa !15
|
|
ret ptr %this
|
|
}
|
|
|
|
|
|
!6 = !{!7, !8, i64 0}
|
|
!7 = !{!"S", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
|
|
!8 = !{!"bool", !9, i64 0}
|
|
!9 = !{!"omnipotent char", !10, i64 0}
|
|
!10 = !{!"Simple C++ TBAA"}
|
|
!11 = !{i8 0, i8 2}
|
|
!12 = !{}
|
|
!13 = !{!7, !8, i64 1}
|
|
!14 = !{!7, !8, i64 2}
|
|
!15 = !{!7, !8, i64 3}
|
|
|
|
;.
|
|
; CHECK: [[BOOL_TBAA0]] = !{[[META1:![0-9]+]], [[META1]], i64 0}
|
|
; CHECK: [[META1]] = !{!"bool", [[META2:![0-9]+]], i64 0}
|
|
; CHECK: [[META2]] = !{!"omnipotent char", [[META3:![0-9]+]], i64 0}
|
|
; CHECK: [[META3]] = !{!"Simple C++ TBAA"}
|
|
;.
|