From 421804420d4ffe2cd89e762106d2de01a8efe805 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 22 Aug 2013 09:57:11 +0000 Subject: ARM: use TableGen patterns to select CMOV operations. Back in the mists of time (2008), it seems TableGen couldn't handle the patterns necessary to match ARM's CMOV node that we convert select operations to, so we wrote a lot of fairly hairy C++ to do it for us. TableGen can deal with it now: there were a few minor differences to CodeGen (see tests), but nothing obviously worse that I could see, so we should probably address anything that *does* come up in a localised manner. llvm-svn: 188995 --- llvm/test/CodeGen/ARM/select-imm.ll | 10 +++++----- llvm/test/CodeGen/ARM/select.ll | 2 +- llvm/test/CodeGen/ARM/setcc-sentinals.ll | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/test/CodeGen/ARM') diff --git a/llvm/test/CodeGen/ARM/select-imm.ll b/llvm/test/CodeGen/ARM/select-imm.ll index 5e7506a06d5..6f4bfb81d51 100644 --- a/llvm/test/CodeGen/ARM/select-imm.ll +++ b/llvm/test/CodeGen/ARM/select-imm.ll @@ -11,7 +11,7 @@ entry: ; ARMT2-LABEL: t1: ; ARMT2: movw [[R:r[0-1]]], #357 -; ARMT2: movgt [[R]], #123 +; ARMT2: movwgt [[R]], #123 ; THUMB2-LABEL: t1: ; THUMB2: movw [[R:r[0-1]]], #357 @@ -25,9 +25,9 @@ entry: define i32 @t2(i32 %c) nounwind readnone { entry: ; ARM-LABEL: t2: -; ARM: mov [[R:r[0-1]]], #123 -; ARM: movgt [[R]], #101 -; ARM: orrgt [[R]], [[R]], #256 +; ARM: mov [[R:r[0-9]+]], #101 +; ARM: orr [[R]], [[R]], #256 +; ARM: movle [[R]], #123 ; ARMT2-LABEL: t2: ; ARMT2: mov [[R:r[0-1]]], #123 @@ -50,7 +50,7 @@ entry: ; ARMT2-LABEL: t3: ; ARMT2: mov [[R:r[0-1]]], #0 -; ARMT2: moveq [[R]], #1 +; ARMT2: movweq [[R]], #1 ; THUMB2-LABEL: t3: ; THUMB2: mov{{(s|\.w)}} [[R:r[0-1]]], #0 diff --git a/llvm/test/CodeGen/ARM/select.ll b/llvm/test/CodeGen/ARM/select.ll index d5c3a270a49..e98ac7daffd 100644 --- a/llvm/test/CodeGen/ARM/select.ll +++ b/llvm/test/CodeGen/ARM/select.ll @@ -59,7 +59,7 @@ entry: define double @f7(double %a, double %b) { ;CHECK-LABEL: f7: ;CHECK: movlt -;CHECK: movlt +;CHECK: movge ;CHECK-VFP-LABEL: f7: ;CHECK-VFP: vmovmi %tmp = fcmp olt double %a, 1.234e+00 diff --git a/llvm/test/CodeGen/ARM/setcc-sentinals.ll b/llvm/test/CodeGen/ARM/setcc-sentinals.ll index 4033a810985..8878f9bf22d 100644 --- a/llvm/test/CodeGen/ARM/setcc-sentinals.ll +++ b/llvm/test/CodeGen/ARM/setcc-sentinals.ll @@ -5,7 +5,7 @@ define zeroext i1 @test0(i32 %x) nounwind { ; CHECK-NEXT: add [[REG:(r[0-9]+)|(lr)]], r0, #1 ; CHECK-NEXT: mov r0, #0 ; CHECK-NEXT: cmp [[REG]], #1 -; CHECK-NEXT: movhi r0, #1 +; CHECK-NEXT: movwhi r0, #1 ; CHECK-NEXT: bx lr %cmp1 = icmp ne i32 %x, -1 %not.cmp = icmp ne i32 %x, 0 -- cgit v1.2.3