llvm-6502/test
Chandler Carruth ab5a55e118 Cleanup and relax a restriction on the matching of global offsets into
x86 addressing modes. This allows PIE-based TLS offsets to fit directly
into an addressing mode immediate offset, which is the last remaining
code quality issue from PR12380. With this patch, that PR is completely
fixed.

To understand why this patch is correct to match these offsets into
addressing mode immediates, break it down by cases:
1) 32-bit is trivially correct, and unmodified here.
2) 64-bit non-small mode is unchanged and never matches.
3) 64-bit small PIC code which is RIP-relative is handled specially in
   the match to try to fit RIP into the base register. If it fails, it
   now early exits. This behavior is unchanged by the patch.
4) 64-bit small non-PIC code which is not RIP-relative continues to work
   as it did before. The reason these immediates are safe is because the
   ABI ensures they fit in small mode. This behavior is unchanged.
5) 64-bit small PIC code which is *not* using RIP-relative addressing.
   This is the only case changed by the patch, and the primary place you
   see it is in TLS, either the win64 section offset TLS or Linux
   local-exec TLS model in a PIC compilation. Here the ABI again ensures
   that the immediates fit because we are in small mode, and any other
   operations required due to the PIC relocation model have been handled
   externally to the Wrapper node (extra loads etc are made around the
   wrapper node in ISelLowering).

I've tested this as much as I can comparing it with GCC's output, and
everything appears safe. I discussed this with Anton and it made sense
to him at least at face value. That said, if there are issues with PIC
code after this patch, yell and we can revert it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154304 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-09 02:13:06 +00:00
..
Analysis SCEV: When expanding a GEP the final addition to the base pointer has NUW but not NSW. 2012-04-07 17:19:26 +00:00
Archive
Assembler Remove old 'grep' lines. 2012-04-08 11:53:54 +00:00
Bindings/Ocaml Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
Bitcode FileCheckize these testcases. 2012-04-08 11:00:38 +00:00
BugPoint
CodeGen Cleanup and relax a restriction on the matching of global offsets into 2012-04-09 02:13:06 +00:00
DebugInfo Patch to set is_stmt a little better for prologue lines in a function. 2012-04-05 20:39:05 +00:00
ExecutionEngine Revert r153694. It was causing failures in the buildbots. 2012-03-29 23:23:59 +00:00
Feature This file is no longer needed (DejaGNU-isms removed from code) 2012-03-25 12:43:54 +00:00
Instrumentation [tsan] treat vtable pointer updates in a special way (requires tbaa); fix a bug (forgot to return true after instrumenting); make sure the tsan tests are run 2012-03-26 17:35:03 +00:00
Integer
Linker
MC Add the tests that were supposed to go with r153935 that I forgot svn add 2012-04-06 07:09:59 +00:00
Object Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
Other Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
Scripts
TableGen
Transforms Teach InstCombine to nuke a common alloca pattern -- an alloca which has 2012-04-08 14:36:56 +00:00
Unit
Verifier
YAMLParser Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
CMakeLists.txt Revert r153694. It was causing failures in the buildbots. 2012-03-29 23:23:59 +00:00
lit.cfg Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
lit.site.cfg.in Revert r153694. It was causing failures in the buildbots. 2012-03-29 23:23:59 +00:00
Makefile Revert r153694. It was causing failures in the buildbots. 2012-03-29 23:23:59 +00:00
Makefile.tests
site.exp.in
TestRunner.sh