Fix PR13727
authorMichael Liao <michael.liao@intel.com>
Thu, 30 Aug 2012 00:30:16 +0000 (00:30 +0000)
committerMichael Liao <michael.liao@intel.com>
Thu, 30 Aug 2012 00:30:16 +0000 (00:30 +0000)
commitfaa1159a6915992d7f035ce06caf952fd4a4e96a
treeef8416b3e495d0bef6e13c2798705ef22c25d40d
parentb4e090dffc4bed40cee22b94560aa8dd3b4af013
Fix PR13727

- The root cause is that target constant materialization in X86 fast-isel
  creates a PC-rel addressing which may overflow 32-bit range in non-Small code
  model if .rodata section is allocated too far away from code segment in
  MCJIT, which uses Large code model so far.
- Follow the similar logic to fix non-Small code model in fast-isel by skipping
  non-Small code model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162881 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FastISel.cpp
test/CodeGen/X86/pr13727.ll [new file with mode: 0644]