1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/CodeGen/ARM/peephole-bitcast.ll
Sjoerd Meijer 685b2ac70c [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.
2020-02-06 14:36:48 +00:00

31 lines
851 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=arm-- -mcpu=cortex-a8 | FileCheck %s
; 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:
%0 = bitcast float %x to i32
%cmp = icmp ult i32 %0, 2139095039
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
tail call void @doSomething(float %x) nounwind
br label %if.end
if.end: ; preds = %if.then, %entry
ret void
}
declare void @doSomething(float)