[llvm] 20a1d03 - [ARM] peephole-bitcast test change. NFC.
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 06:38:10 PST 2020
Author: Sjoerd Meijer
Date: 2020-02-06T14:36:48Z
New Revision: 20a1d03d778dedaa91cbf8ff63d4be92c2291ca0
URL: https://github.com/llvm/llvm-project/commit/20a1d03d778dedaa91cbf8ff63d4be92c2291ca0
DIFF: https://github.com/llvm/llvm-project/commit/20a1d03d778dedaa91cbf8ff63d4be92c2291ca0.diff
LOG: [ARM] peephole-bitcast test change. NFC.
This test case was XFAIL'ed because the peepholer was missing an optimisation.
But the peepholer is now able to handle this case, so enable this test. I will
close the corresponding and very old PR11364.
Added:
Modified:
llvm/test/CodeGen/ARM/peephole-bitcast.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/ARM/peephole-bitcast.ll b/llvm/test/CodeGen/ARM/peephole-bitcast.ll
index 6414cf694d2e..dff6b4be5c16 100644
--- a/llvm/test/CodeGen/ARM/peephole-bitcast.ll
+++ b/llvm/test/CodeGen/ARM/peephole-bitcast.ll
@@ -1,18 +1,20 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=arm-- -mcpu=cortex-a8 | FileCheck %s
-; XFAIL: *
-; PR11364
-; vmov s0, r0 + vmov r0, s0 should have been optimized away.
-; rdar://9104514
-
-; Peephole leaves a dead vmovsr instruction behind, and depends on linear scan
-; to remove it.
+; Check that the peepholer removes dead instructions:
+;
+; vmov s0, r0
+; vmov r0, s0
define void @t(float %x) nounwind ssp {
+; CHECK-LABEL: t:
+; CHECK: @ %bb.0: @ %entry
+; CHECK-NEXT: movw r1, #65534
+; CHECK-NEXT: movt r1, #32639
+; CHECK-NEXT: cmp r0, r1
+; CHECK-NEXT: bxhi lr
+; CHECK-NEXT: b doSomething
entry:
-; CHECK-LABEL: t:
-; CHECK-NOT: vmov
-; CHECK: bl
%0 = bitcast float %x to i32
%cmp = icmp ult i32 %0, 2139095039
br i1 %cmp, label %if.then, label %if.end
More information about the llvm-commits
mailing list