diff options
| author | Joey Gouly <joey.gouly@arm.com> | 2013-09-09 14:21:49 +0000 |
|---|---|---|
| committer | Joey Gouly <joey.gouly@arm.com> | 2013-09-09 14:21:49 +0000 |
| commit | a5153cb0255bd2c9e0476642643e283ec9a7523c (patch) | |
| tree | d7e5e2bf9f9e9842e418a46429ce803244aeaf4a /llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll | |
| parent | 83d81784df07834783f44294766e340f37f7873b (diff) | |
| download | bcm5719-llvm-a5153cb0255bd2c9e0476642643e283ec9a7523c.tar.gz bcm5719-llvm-a5153cb0255bd2c9e0476642643e283ec9a7523c.zip | |
[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of
the 16 instructions.
Patch by Artyom Skrobov!
llvm-svn: 190309
Diffstat (limited to 'llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll')
| -rw-r--r-- | llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll b/llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll index 2eeebac9930..8bc8cb1d890 100644 --- a/llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll +++ b/llvm/test/CodeGen/ARM/2013-05-05-IfConvertBug.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-ios -mcpu=cortex-a8 | FileCheck %s +; RUN: llc < %s -mtriple=thumbv8 | FileCheck -check-prefix=CHECK-V8 %s ; rdar://13782395 define i32 @t1(i32 %a, i32 %b, i8** %retaddr) { @@ -100,6 +101,27 @@ KBBlockZero.exit: ; preds = %bb2.i ; CHECK: [[LABEL]]: ; CHECK-NEXT: subs r0, r1, r0 ; CHECK-NEXT: bx lr + +; CHECK-V8-LABEL: wrapDistance: +; CHECK-V8: cmp r1, #59 +; CHECK-V8-NEXT: bgt +; CHECK-V8-NEXT: %if.then +; CHECK-V8-NEXT: subs r0, r2, #1 +; CHECK-V8-NEXT: bx lr +; CHECK-V8-NEXT: %if.else +; CHECK-V8-NEXT: subs [[REG:r[0-9]+]], #120 +; CHECK-V8-NEXT: cmp [[REG]], r1 +; CHECK-V8-NEXT: bge +; CHECK-V8-NEXT: %if.else +; CHECK-V8-NEXT: cmp r0, #119 +; CHECK-V8-NEXT: bgt +; CHECK-V8-NEXT: %if.then4 +; CHECK-V8-NEXT: adds r0, r1, #1 +; CHECK-V8-NEXT: bx lr +; CHECK-V8-NEXT: %if.end5 +; CHECK-V8-NEXT: subs r0, r1, r0 +; CHECK-V8-NEXT: bx lr + define i32 @wrapDistance(i32 %tx, i32 %sx, i32 %w) { entry: %cmp = icmp slt i32 %sx, 60 |

