]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/AVR/lower-formal-args-struct-return.ll
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / CodeGen / AVR / lower-formal-args-struct-return.ll
1 ; RUN: llc < %s -march=avr | FileCheck %s
2
3 ; This test ensures that the backend can lower returns of struct values.
4 ; It does not check how these are lowered.
5 ;
6 ; In the past, this code used to return an error
7 ;
8 ; Assertion `InVals.size() == Ins.size() && "LowerFormalArguments didn't emit the correct number of values!"' failed.
9 ;
10 ; This feature was first implemented in r325474.
11
12 declare i8 @do_something(i8 %val)
13
14 ; CHECK-LABEL: main
15 define { i1, i8 } @main(i8) #2 {
16 entry:
17   %1 = call zeroext i8 @do_something(i8 zeroext %0)
18   %2 = insertvalue { i1, i8 } { i1 true, i8 undef }, i8 %1, 1
19   ret { i1, i8 } %2
20 }
21