Another nasty coalescer bug (is there another kind):
commit4e4498e03db13890aedf4a241bb3d2a6c5826adf
authorEvan Cheng <evan.cheng@apple.com>
Wed, 5 Aug 2009 07:05:41 +0000 (5 07:05 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 5 Aug 2009 07:05:41 +0000 (5 07:05 +0000)
treef54dacb4dcd4b1a76d5ce89e91b12d6988e60d05
parent661404bba65dfd26fa385f41fe8d46c68702ef6d
Another nasty coalescer bug (is there another kind):

After coalescing reg1027's def and kill are both at the same point:
 %reg1027,0.000000e+00 = [56,814:0)  0@70-(814)

bb5:
60   %reg1027<def> = t2MOVr %reg1027, 14, %reg0, %reg0
68   %reg1027<def> = t2LDRi12 %reg1027<kill>, 8, 14, %reg0
76   t2CMPzri %reg1038<kill,undef>, 0, 14, %reg0, %CPSR<imp-def>
84   %reg1027<def> = t2MOVr %reg1027, 14, %reg0, %reg0
96   t2Bcc mbb<bb5,0x2030910>, 1, %CPSR<kill>

Do not remove the kill marker on t2LDRi12.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78178 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll [new file with mode: 0644]