mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
3986785046
We can't enable the verifier for tests with SI_IF and SI_ELSE, because these instructions are always followed by a COPY which copies their result to the next basic block. This violates the machine verifier's rule that non-terminators can not folow terminators. Reviewed-by: Vincent Lejeune<vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192366 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
718 B
LLVM
23 lines
718 B
LLVM
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=R600-CHECK
|
|
; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s --check-prefix=SI-CHECK
|
|
|
|
; DAGCombiner will transform:
|
|
; (fabs (f32 bitcast (i32 a))) => (f32 bitcast (and (i32 a), 0x7FFFFFFF))
|
|
; unless isFabsFree returns true
|
|
|
|
; R600-CHECK: @fabs_free
|
|
; R600-CHECK-NOT: AND
|
|
; R600-CHECK: |PV.{{[XYZW]}}|
|
|
; SI-CHECK: @fabs_free
|
|
; SI-CHECK: V_ADD_F32_e64 VGPR{{[0-9]}}, SGPR{{[0-9]}}, 0, 1, 0, 0, 0
|
|
|
|
define void @fabs_free(float addrspace(1)* %out, i32 %in) {
|
|
entry:
|
|
%0 = bitcast i32 %in to float
|
|
%1 = call float @fabs(float %0)
|
|
store float %1, float addrspace(1)* %out
|
|
ret void
|
|
}
|
|
|
|
declare float @fabs(float ) readnone
|