• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %s -inline -S | FileCheck %s
2
3define internal void @innerSmall() "min-legal-vector-width"="128" {
4  ret void
5}
6
7define internal void @innerLarge() "min-legal-vector-width"="512" {
8  ret void
9}
10
11define internal void @innerNoAttribute() {
12  ret void
13}
14
15; We should not add an attribute during inlining. No attribute means unknown.
16; Inlining doesn't change the fact that we don't know anything about this
17; function.
18define void @outerNoAttribute() {
19  call void @innerLarge()
20  ret void
21}
22
23define void @outerConflictingAttributeSmall() "min-legal-vector-width"="128" {
24  call void @innerLarge()
25  ret void
26}
27
28define void @outerConflictingAttributeLarge() "min-legal-vector-width"="512" {
29  call void @innerSmall()
30  ret void
31}
32
33; We should remove the attribute after inlining since the callee's
34; vector width requirements are unknown.
35define void @outerAttribute() "min-legal-vector-width"="128" {
36  call void @innerNoAttribute()
37  ret void
38}
39
40; CHECK: define void @outerNoAttribute() {
41; CHECK: define void @outerConflictingAttributeSmall() #0
42; CHECK: define void @outerConflictingAttributeLarge() #0
43; CHECK: define void @outerAttribute() {
44; CHECK: attributes #0 = { "min-legal-vector-width"="512" }
45