ARM: mark branch-like instructions with correct flags.
authorTim Northover <tnorthover@apple.com>
Wed, 29 Apr 2015 19:16:38 +0000 (19:16 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 29 Apr 2015 19:16:38 +0000 (19:16 +0000)
There's probably no way to test BXJ, but if the compiler ever did emit it
during CodeGen it would have to be a block terminator so "isBranch" is
appropriate.

BLX is more tricky. Clearly a call, but it affects surprisingly little.

rdar://18719544

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236140 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrInfo.td

index bda6c944ce3bfb6060e80bde1565601fa639bc2f..9fb0d72f098b57ab230780a22fc01cd1238f8c46 100644 (file)
@@ -2256,6 +2256,7 @@ def BLXi : AXI<(outs), (ins blx_target:$target), BrMiscFrm, NoItinerary,
   bits<25> target;
   let Inst{23-0} = target{24-1};
   let Inst{24} = target{0};
+  let isCall = 1;
 }
 
 // Branch and Exchange Jazelle
@@ -2266,6 +2267,7 @@ def BXJ : ABI<0b0001, (outs), (ins GPR:$func), NoItinerary, "bxj", "\t$func",
   let Inst{19-8} = 0xfff;
   let Inst{7-4} = 0b0010;
   let Inst{3-0} = func;
+  let isBranch = 1;
 }
 
 // Tail calls.