revert r114386 now that address modes work correctly, we get a nice
authorChris Lattner <sabre@nondot.org>
Wed, 22 Sep 2010 00:11:31 +0000 (00:11 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 Sep 2010 00:11:31 +0000 (00:11 +0000)
call through gs-relative memory now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114510 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/movgs.ll

index de1f014d83e81da968b2cff2f6d3daf55709904c..5c133f12e44bece728fcf94bed004dd81d5c363f 100644 (file)
@@ -403,10 +403,6 @@ static bool isCalleeLoad(SDValue Callee, SDValue &Chain, bool HasCallSeq) {
       LD->getExtensionType() != ISD::NON_EXTLOAD)
     return false;
 
-  // FIXME: Calls can't fold loads through segment registers yet.
-  if (LD->getPointerInfo().getAddrSpace() > 255)
-    return false;
-  
   // Now let's find the callseq_start.
   while (HasCallSeq && Chain.getOpcode() != ISD::CALLSEQ_START) {
     if (!Chain.hasOneUse())
index ed201f36e92c1069a10b08ec6c3ebd72b0eecddb..3a249470d46890d1d22f9ec4694d1ff636b24b65 100644 (file)
@@ -26,10 +26,8 @@ entry:
 
 ; rdar://8453210
 ; X32: test2:
-; X32: movl    %gs:(%eax), %eax
-; X32: movl    %eax, (%esp)
-; X32: call    *%eax
+; X32: movl    16(%esp), %eax
+; X32: call    *%gs:(%eax)
 
 ; X64: test2:
-; X64: movq    %gs:(%rdi), %rax
-; X64: callq   *%rax
+; X64: callq   *%gs:(%rdi)