llvm/lib
Diana Picus a479e53b55 [ARM] GlobalISel: Select hard G_FCMP for s32
We lower to a sequence consisting of:
- MOVi 0 into a register
- VCMPS to do the actual comparison and set the VFP flags
- FMSTAT to move the flags out of the VFP unit
- MOVCCi to either use the "zero register" that we have previously set
  with the MOVi, or move 1 into the result register, based on the values
  of the flags

As was the case with soft-float, for some predicates (one, ueq) we
actually need two comparisons instead of just one. When that happens, we
generate two VCMPS-FMSTAT-MOVCCi sequences and chain them by means of
using the result of the first MOVCCi as the "zero register" for the
second one. This is a bit overkill, since one comparison followed by
two non-flag-setting conditional moves should be enough. In any case,
the backend manages to CSE one of the comparisons away so it doesn't
matter much.

Note that unlike SelectionDAG and FastISel, we always use VCMPS, and not
VCMPES. This makes the code a lot simpler, and it also seems correct
since the LLVM Lang Ref defines simple true/false returns if the
operands are QNaN's. For SNaN's, even VCMPS throws an Invalid Operand
exception, so they won't be slipping through unnoticed.

Implementation-wise, this introduces a template so we can share the same
code that we use for handling integer comparisons, since the only
differences are in the details (exact opcodes to be used etc). Hopefully
this will be easy to extend to s64 G_FCMP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 08:39:04 +00:00
..
Analysis Extend memcpy expansion in Transform/Utils to handle wider operand types. 2017-07-07 02:00:06 +00:00
AsmParser Add dependency from AsmParser to BinaryFormat. 2017-06-07 04:24:33 +00:00
BinaryFormat Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""" 2017-07-05 23:45:50 +00:00
Bitcode Bitcode: Include any strings added to the string table in the module hash. 2017-07-06 17:56:01 +00:00
CodeGen RegisterScavenging: Fix PR33687 2017-07-07 03:02:18 +00:00
DebugInfo Reduce code duplication. 2017-07-07 05:36:53 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [ORC] Errorize the ORC APIs. 2017-07-07 02:59:13 +00:00
Fuzzer [libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items. 2017-06-15 22:43:40 +00:00
IR [SafepointIRVerifier] NFC: Refactor code for identifying exclusive base type 2017-07-07 00:40:37 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LineEditor
Linker Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
LTO [LTO] Fix the interaction between linker redefined symbols and ThinLTO 2017-07-06 19:58:26 +00:00
MC [WebAssembly] Support weak defined symbols 2017-07-07 02:01:29 +00:00
Object [WebAssembly] Support weak defined symbols 2017-07-07 02:01:29 +00:00
ObjectYAML [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-01 01:35:55 +00:00
Option [Bash-autocompletion] Show flags which has HelpText or GroupID 2017-07-05 02:36:32 +00:00
Passes Hook the sample PGO machinery in the new PM 2017-06-29 23:33:05 +00:00
ProfileData Prototype: Reduce llvm-profdata merge memory usage further 2017-07-06 19:00:12 +00:00
Support Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR 2017-06-30 20:56:57 +00:00
TableGen [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Target [ARM] GlobalISel: Select hard G_FCMP for s32 2017-07-07 08:39:04 +00:00
Testing Mark LLVMTestingSupport as not installed in LLVMBuild. 2017-06-19 22:01:50 +00:00
ToolDrivers [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
Transforms [InferAddressSpaces] Fix assertion about null pointer 2017-07-07 02:40:13 +00:00
XRay Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
LLVMBuild.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00