brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 6746fc2 Raw
45 lines · plain
1; RUN: opt %s -passes=inline -S | FileCheck %s2 3define internal void @innerSmall() "min-legal-vector-width"="128" {4  ret void5}6 7define internal void @innerLarge() "min-legal-vector-width"="512" {8  ret void9}10 11define internal void @innerNoAttribute() {12  ret void13}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 this17; function.18define void @outerNoAttribute() {19  call void @innerLarge()20  ret void21}22 23define void @outerConflictingAttributeSmall() "min-legal-vector-width"="128" {24  call void @innerLarge()25  ret void26}27 28define void @outerConflictingAttributeLarge() "min-legal-vector-width"="512" {29  call void @innerSmall()30  ret void31}32 33; We should remove the attribute after inlining since the callee's34; vector width requirements are unknown.35define void @outerAttribute() "min-legal-vector-width"="128" {36  call void @innerNoAttribute()37  ret void38}39 40; CHECK: define void @outerNoAttribute() {41; CHECK: define void @outerConflictingAttributeSmall() #042; CHECK: define void @outerConflictingAttributeLarge() #043; CHECK: define void @outerAttribute() {44; CHECK: attributes #0 = { "min-legal-vector-width"="512" }45