1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test
Ahmed Bougacha d78960d142 [X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC.
Re-apply r265450 which caused PR27245 and was reverted in r265559
because of a wrong generalization: the fetch_and_add->add_and_fetch
combine only works in specific, but pretty common, cases:
  (icmp slt x, 0) -> (icmp sle (add x, 1), 0)
  (icmp sge x, 0) -> (icmp sgt (add x, 1), 0)
  (icmp sle x, 0) -> (icmp slt (sub x, 1), 0)
  (icmp sgt x, 0) -> (icmp sge (sub x, 1), 0)

Original Message:

We only generate LOCKed versions of add/sub when the result is unused.
It often happens that the result is used, but only by a comparison. We
can optimize those out by reusing EFLAGS, which lets us use the proper
instructions, instead of having to fallback to LXADD.

Instead of doing this as an MI peephole (as we do for the other
non-LOCKed (really, non-MR) forms), do it in ISel. It becomes quite
tricky later.

This also makes it eventually possible to stop expanding and/or/xor
if the only user is an icmp (also see D18141).

This uses the LOCK ISD opcodes added by r262244.

Differential Revision: http://reviews.llvm.org/D17633

llvm-svn: 265636
2016-04-07 02:07:10 +00:00
..
Analysis AMDGPU: Add a shader calling convention 2016-04-06 19:40:20 +00:00
Assembler AsmParser: Don't crash on unresolved !tbaa 2016-04-06 02:06:40 +00:00
Bindings [OCaml] Reinstate data_layout 2016-04-01 07:54:24 +00:00
Bitcode Bitcode: Try to emit metadata in function blocks 2016-04-02 15:22:57 +00:00
BugPoint
CodeGen [X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC. 2016-04-07 02:07:10 +00:00
DebugInfo Add missing emissionKind flags to the DICompileUnits of several old testcases. 2016-04-01 22:18:43 +00:00
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation [sancov] enabling coverage edge pruning by default. 2016-04-06 23:24:37 +00:00
Integer
JitListener testcase gardening: update the emissionKind enum to the new syntax. (NFC) 2016-04-01 00:16:49 +00:00
LibDriver
Linker testcase gardening: update the emissionKind enum to the new syntax. (NFC) 2016-04-01 00:16:49 +00:00
LTO [LoopVectorize] Don't unconditionally print vectorization diagnostics 2016-04-01 00:34:39 +00:00
MC [AMDGPU] AsmParser: disable DPP for unsupported instructions. New dpp tests. Fix v_nop_dpp. 2016-04-06 13:29:59 +00:00
Object Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
Other
SymbolRewriter
TableGen
ThinLTO/X86 ThinLTO: special handling for LinkOnce functions 2016-04-01 21:53:50 +00:00
tools Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
Transforms [LoopUnroll] Fix the way we update DT after complete unrolling. 2016-04-06 21:47:12 +00:00
Unit
Verifier [IRVerifier] Don't crash on invalid DIFile inside DISubprogram. 2016-04-06 18:46:39 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg test: Always treat .mir files as tests even outside of CodeGen/MIR 2016-04-04 21:23:44 +00:00
lit.site.cfg.in
TestRunner.sh