John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1 | ; RUN: llc < %s |
| 2 | ; |
| 3 | ; This test would crash because isel creates a GPR register for the return |
| 4 | ; value from f1. The register is only used by tBLXr_r9 which accepts a full GPR |
| 5 | ; register, but we cannot have live GPRs in thumb mode because we don't know how |
| 6 | ; to spill them. |
| 7 | ; |
| 8 | ; <rdar://problem/9624323> |
| 9 | target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" |
| 10 | target triple = "thumbv6-apple-darwin10" |
| 11 | |
| 12 | %0 = type opaque |
| 13 | |
| 14 | declare i8* (i8*, i8*, ...)* @f1(i8*, i8*) optsize |
| 15 | declare i8* @f2(i8*, i8*, ...) |
| 16 | |
| 17 | define internal void @f(i8* %self, i8* %_cmd, %0* %inObjects, %0* %inIndexes) optsize ssp { |
| 18 | entry: |
| 19 | %call14 = tail call i8* (i8*, i8*, ...)* (i8*, i8*)* @f1(i8* undef, i8* %_cmd) optsize |
| 20 | %0 = bitcast i8* (i8*, i8*, ...)* %call14 to void (i8*, i8*, %0*, %0*)* |
| 21 | tail call void %0(i8* %self, i8* %_cmd, %0* %inObjects, %0* %inIndexes) optsize |
| 22 | tail call void bitcast (i8* (i8*, i8*, ...)* @f2 to void (i8*, i8*, i32, %0*, %0*)*)(i8* %self, i8* undef, i32 2, %0* %inIndexes, %0* undef) optsize |
| 23 | ret void |
| 24 | } |