1 ; RUN: opt %s -passes=inline -S | FileCheck %s
3 define internal void @innerSmall() "min-legal-vector-width"="128" {
7 define internal void @innerLarge() "min-legal-vector-width"="512" {
11 define internal void @innerNoAttribute() {
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
18 define void @outerNoAttribute() {
19 call void @innerLarge()
23 define void @outerConflictingAttributeSmall() "min-legal-vector-width"="128" {
24 call void @innerLarge()
28 define void @outerConflictingAttributeLarge() "min-legal-vector-width"="512" {
29 call void @innerSmall()
33 ; We should remove the attribute after inlining since the callee's
34 ; vector width requirements are unknown.
35 define void @outerAttribute() "min-legal-vector-width"="128" {
36 call void @innerNoAttribute()
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" }