brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 7685526 Raw
81 lines · plain
1; RUN: llc < %s -verify-machineinstrs -frame-pointer=all -disable-machine-dce -verify-coalescing2target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"3target triple = "x86_64-apple-macosx10.7.0"4 5; This test case has a sub-register join followed by a remat:6;7; 256L    %2 = COPY killed %7:sub_32bit; GR32:%2 GR64:%78;         Considering merging %2 with %7:sub_32bit9;         Cross-class to GR64.10;                 RHS = %2 = [256d,272d:0)  0@256d11;                 LHS = %7 = [208d,256d:0)[304L,480L:0)  0@208d12;                 updated: 272L   %0 = COPY killed %7:sub_32bit; GR32:%0 GR64:%713;         Joined. Result = %7 = [208d,272d:0)[304L,480L:0)  0@208d14;15; 272L    %10:sub_32bit = COPY killed %7:sub_32bit, implicit-def %10; GR64:%10,%716;         Considering merging %7 with %1017;                 RHS = %7 = [208d,272d:0)[304L,480L:0)  0@208d18;                 LHS = %10 = [16d,64L:2)[64L,160L:1)[192L,240L:1)[272d,304L:3)[304L,352d:1)[352d,400d:0)[400d,400S:4)  0@352d 1@64L-phidef 2@16d-phikill 3@272d-phikill 4@400d19; Remat: %10 = MOV64r0 implicit-def %10, implicit dead %eflags, implicit-def %10; GR64:%1020; Shrink: %7 = [208d,272d:0)[304L,480L:0)  0@208d21;  live-in at 240L22;  live-in at 416L23;  live-in at 320L24;  live-in at 304L25; Shrunk: %7 = [208d,256d:0)[304L,480L:0)  0@208d26;27; The COPY at 256L is rewritten as a partial def, and that would artificially28; extend the live range of %7 to end at 256d.  When the joined copy is29; removed, -verify-coalescing complains about the dangling kill.30;31; <rdar://problem/9967101>32 33define void @f1() nounwind uwtable ssp {34bb:35  br label %bb136 37bb1:38  %tmp = phi i32 [ 0, %bb ], [ %tmp21, %bb20 ]39  br label %bb240 41bb2:42  br i1 undef, label %bb5, label %bb843 44bb4:45  br i1 undef, label %bb2, label %bb2046 47bb5:48  br i1 undef, label %bb4, label %bb2049 50bb8:51  %tmp9 = phi i32 [ %tmp24, %bb23 ], [ 0, %bb2 ]52  br i1 false, label %bb41, label %bb1053 54bb10:55  %tmp11 = sub nsw i32 %tmp9, %tmp56  br i1 false, label %bb2, label %bb2657 58bb20:59  %tmp21 = phi i32 [ undef, %bb4 ], [ undef, %bb5 ], [ %tmp9, %bb27 ], [ undef, %bb32 ]60  %tmp22 = phi i32 [ undef, %bb4 ], [ undef, %bb5 ], [ %tmp11, %bb27 ], [ undef, %bb32 ]61  br label %bb162 63bb23:64  %tmp24 = add nsw i32 %tmp9, 165  br label %bb866 67bb26:68  br i1 undef, label %bb27, label %bb3269 70bb27:71  %tmp28 = zext i32 %tmp11 to i6472  %tmp30 = icmp eq i64 undef, %tmp2873  br i1 %tmp30, label %bb20, label %bb2774 75bb32:76  br i1 undef, label %bb20, label %bb2377 78bb41:79  ret void80}81