summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAugie Fackler <augie@google.com>2022-02-03 08:31:44 -0800
committerPhilip Reames <listmail@philipreames.com>2022-02-03 08:36:36 -0800
commitaade28ea70f5af563af20380a2a0df4166581a53 (patch)
treee7101a869577e857ec16bbed1db89ddc6e8a77f7
parentb2d091aa5d31ffaa6715868a1401472ed5f55808 (diff)
add IR compatability test for (upcoming) allocsize attribute
-rw-r--r--llvm/test/Bitcode/compatibility.ll13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/test/Bitcode/compatibility.ll b/llvm/test/Bitcode/compatibility.ll
index 2e73810380f6..1f0da632343e 100644
--- a/llvm/test/Bitcode/compatibility.ll
+++ b/llvm/test/Bitcode/compatibility.ll
@@ -1510,7 +1510,7 @@ exit:
; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
call void @f.nobuiltin() builtin
- ; CHECK: call void @f.nobuiltin() #46
+ ; CHECK: call void @f.nobuiltin() #48
call fastcc noalias i32* @f.noalias() noinline
; CHECK: call fastcc noalias i32* @f.noalias() #12
@@ -1923,6 +1923,13 @@ declare void @byval_named_type(%named_type* byval(%named_type))
; CHECK: declare void @byval_type2({ i8, i8* }* byval({ i8, i8* }))
; CHECK: declare void @byval_named_type([8 x i8]* byval([8 x i8]))
+declare void @f.allocsize_one(i32) allocsize(0)
+declare void @f.allocsize_two(i32, i32) allocsize(1, 0)
+; CHECK: Function Attrs: allocsize(0)
+; CHECK: declare void @f.allocsize_one(i32)
+; CHECK: Function Attrs: allocsize(1,0)
+; CHECK: declare void @f.allocsize_two(i32, i32)
+
; CHECK: attributes #0 = { alignstack=4 }
; CHECK: attributes #1 = { alignstack=8 }
; CHECK: attributes #2 = { alwaysinline }
@@ -1969,7 +1976,9 @@ declare void @byval_named_type(%named_type* byval(%named_type))
; CHECK: attributes #43 = { strictfp }
; CHECK: attributes #44 = { nosanitize_coverage }
; CHECK: attributes #45 = { disable_sanitizer_instrumentation }
-; CHECK: attributes #46 = { builtin }
+; CHECK: attributes #46 = { allocsize(0) }
+; CHECK: attributes #47 = { allocsize(1,0) }
+; CHECK: attributes #48 = { builtin }
;; Metadata