llvm-6502/test
Evan Cheng 37b7387da9 Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch.
When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.

This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.

Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 08:33:02 +00:00
..
Analysis Slightly reformat LDA tests to ease grepping. 2009-07-28 23:40:40 +00:00
Archive
Assembler Add a new keyword 'inbounds' for use with getelementptr. See the 2009-07-27 21:53:46 +00:00
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch. 2009-07-30 08:33:02 +00:00
DebugInfo
ExecutionEngine
Feature Read and write NamedMDNode. 2009-07-29 22:34:41 +00:00
FrontendAda
FrontendC remove this test. It is currently failing because we now emit the string 2009-07-25 07:31:51 +00:00
FrontendC++ xfail for now. 2009-07-29 17:40:28 +00:00
FrontendFortran
FrontendObjC
FrontendObjC++
Integer
lib
Linker
LLVMC
MC/AsmParser llvm-mc: Implement .abort fully in the front end 2009-07-27 23:20:52 +00:00
Other
Scripts
TableGen
Transforms Fix PR4645 which was fallout from the fix for PR4641. 2009-07-29 22:00:43 +00:00
Verifier
Makefile
Makefile.tests
TestRunner.sh