AMDGPU: Remove old hack for function addresses
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 6 Sep 2018 17:23:24 +0000 (17:23 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 6 Sep 2018 17:23:24 +0000 (17:23 +0000)
llvm-svn: 341567

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

index 749a361..f62db08 100644 (file)
@@ -2421,19 +2421,6 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI,
       ++NumTailCalls;
   }
 
-  if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(Callee)) {
-    // FIXME: Remove this hack for function pointer types after removing
-    // support of old address space mapping. In the new address space
-    // mapping the pointer in default address space is 64 bit, therefore
-    // does not need this hack.
-    if (Callee.getValueType() == MVT::i32) {
-      const GlobalValue *GV = GA->getGlobal();
-      Callee = DAG.getGlobalAddress(GV, DL, MVT::i64, GA->getOffset(), false,
-                                    GA->getTargetFlags());
-    }
-  }
-  assert(Callee.getValueType() == MVT::i64);
-
   const SIMachineFunctionInfo *Info = MF.getInfo<SIMachineFunctionInfo>();
 
   // Analyze operands of the call, assigning locations to each operand.