summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll')
-rw-r--r--llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll b/llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll
index cc00b5e00a7..ec727419f01 100644
--- a/llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll
+++ b/llvm/test/Transforms/Inline/inline-min-legal-vector-width.ll
@@ -8,6 +8,13 @@ define internal void @innerLarge() "min-legal-vector-width"="512" {
ret void
}
+define internal void @innerNoAttribute() {
+ ret void
+}
+
+; We should not add an attribute during inlining. No attribute means unknown.
+; Inlining doesn't change the fact that we don't know anything about this
+; function.
define void @outerNoAttribute() {
call void @innerLarge()
ret void
@@ -23,7 +30,15 @@ define void @outerConflictingAttributeLarge() "min-legal-vector-width"="512" {
ret void
}
-; CHECK: define void @outerNoAttribute() #0
+; We should remove the attribute after inlining since the callee's
+; vector width requirements are unknown.
+define void @outerAttribute() "min-legal-vector-width"="128" {
+ call void @innerNoAttribute()
+ ret void
+}
+
+; CHECK: define void @outerNoAttribute() {
; CHECK: define void @outerConflictingAttributeSmall() #0
; CHECK: define void @outerConflictingAttributeLarge() #0
+; CHECK: define void @outerAttribute() {
; CHECK: attributes #0 = { "min-legal-vector-width"="512" }
OpenPOWER on IntegriCloud