1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Bitcode/upgrade-void-ret-attr-11.0.ll
Steven Wu 5c8193b398 [IR][AutoUpgrade] Drop align attribute from void return types
Since D87304, `align` become an invalid attribute on none pointer types and
verifier will reject bitcode that has invalid `align` attribute.

The problem is before the change, DeadArgumentElimination can easily
turn a pointer return type into a void return type without removing
`align` attribute. Teach Autograde to remove invalid `align` attribute
from return types to maintain bitcode compatibility.

rdar://77022993

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D102201
2021-05-11 08:23:55 -07:00

15 lines
267 B
LLVM

; Check upgrade is removing the incompatible attributes on void return type.
; RUN: llvm-dis < %s.bc | FileCheck %s
; CHECK: define void @f()
define align 8 void @f() {
ret void
}
define void @g() {
; CHECK: call void @f()
call align 8 void @f();
ret void
}