mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
8957a377cc
Based on the discussion in http://lists.llvm.org/pipermail/llvm-dev/2019-October/135574.html, the conclusion was reached that the ARM backend should produce vcmp instead of vcmpe instructions by default, i.e. not be producing an Invalid Operation exception when either arguments in a floating point compare are quiet NaNs. In the future, after constrained floating point intrinsics for floating point compare have been introduced, vcmpe instructions probably should be produced for those intrinsics - depending on the exact semantics they'll be defined to have. This patch logically consists of the following parts: - Revert http://llvm.org/viewvc/llvm-project?rev=294945&view=rev and http://llvm.org/viewvc/llvm-project?rev=294968&view=rev, which implemented fine-tuning for when to produce vcmpe (i.e. not do it for equality comparisons). The complexity introduced by those patches isn't needed anymore if we just always produce vcmp instead. Maybe these patches need to be reintroduced again once support is needed to map potential LLVM-IR constrained floating point compare intrinsics to the ARM instruction set. - Simply select vcmp, instead of vcmpe, see simple changes in lib/Target/ARM/ARMInstrVFP.td - Adapt lots of tests that tested for vcmpe (instead of vcmp). For all of these test, the intent of what is tested for isn't related to whether the vcmp should produce an Invalid Operation exception or not. Fixes PR43374. Differential Revision: https://reviews.llvm.org/D68463 llvm-svn: 374025
23 lines
767 B
LLVM
23 lines
767 B
LLVM
; RUN: llc -mtriple=arm-eabi -mattr=+v6,+vfp2 %s -o - | FileCheck %s
|
|
|
|
define void @test3(float* %glob, i32 %X) {
|
|
entry:
|
|
%tmp = load float, float* %glob ; <float> [#uses=1]
|
|
%tmp2 = getelementptr float, float* %glob, i32 2 ; <float*> [#uses=1]
|
|
%tmp3 = load float, float* %tmp2 ; <float> [#uses=1]
|
|
%tmp.upgrd.1 = fcmp ogt float %tmp, %tmp3 ; <i1> [#uses=1]
|
|
br i1 %tmp.upgrd.1, label %cond_true, label %UnifiedReturnBlock
|
|
|
|
cond_true: ; preds = %entry
|
|
%tmp.upgrd.2 = tail call i32 (...) @bar( ) ; <i32> [#uses=0]
|
|
ret void
|
|
|
|
UnifiedReturnBlock: ; preds = %entry
|
|
ret void
|
|
}
|
|
|
|
declare i32 @bar(...)
|
|
|
|
; CHECK: vcmp.f32
|
|
|