1 ; RUN: llc -mtriple="arm64-apple-ios" < %s | FileCheck %s
3 ; Check that the dead register definition pass is considering implicit defs.
4 ; When rematerializing through truncates, the coalescer may produce instructions
5 ; with dead defs, but live implicit-defs of subregs:
6 ; E.g. dead %x1 = MOVi64imm 2, implicit-def %w1; %x1:GPR64, %w1:GPR32
7 ; These instructions are live, and their definitions should not be rewritten.
9 ; <rdar://problem/16492408>
11 define void @testcase() {
13 ; CHECK-NOT: orr xzr, xzr, #0x2
16 %tmp1 = tail call float @ceilf(float 2.000000e+00)
17 %tmp2 = fptoui float %tmp1 to i64
18 br i1 undef, label %bb2, label %bb3
25 %tmp3 = trunc i64 %tmp2 to i32
26 tail call void @bar(i32 %tmp3)
31 declare void @bar(i32)
32 declare float @ceilf(float) nounwind readnone