diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -5072,14 +5072,6 @@ return PPCISD::CALL; } -static bool isValidAIXExternalSymSDNode(StringRef SymName) { - return StringSwitch(SymName) - .Cases("__divdi3", "__fixunsdfdi", "__floatundidf", "__floatundisf", - "__moddi3", "__udivdi3", "__umoddi3", true) - .Cases("ceil", "floor", "memcpy", "memmove", "memset", "round", true) - .Default(false); -} - static SDValue transformCallee(const SDValue &Callee, SelectionDAG &DAG, const SDLoc &dl, const PPCSubtarget &Subtarget) { if (!Subtarget.usesFunctionDescriptors() && !Subtarget.isELFv2ABI()) @@ -5163,12 +5155,7 @@ SC); } - // TODO: Remove this when the support for ExternalSymbolSDNode is complete. - if (isValidAIXExternalSymSDNode(SymName)) { - return getAIXFuncEntryPointSymbolSDNode(SymName, true, XCOFF::C_EXT); - } - - report_fatal_error("Unexpected ExternalSymbolSDNode: " + Twine(SymName)); + return getAIXFuncEntryPointSymbolSDNode(SymName, true, XCOFF::C_EXT); } // No transformation needed. diff --git a/llvm/test/CodeGen/PowerPC/aix-external-sym-sdnode-lowering.ll b/llvm/test/CodeGen/PowerPC/aix-external-sym-sdnode-lowering.ll --- a/llvm/test/CodeGen/PowerPC/aix-external-sym-sdnode-lowering.ll +++ b/llvm/test/CodeGen/PowerPC/aix-external-sym-sdnode-lowering.ll @@ -6,61 +6,6 @@ ; RUN: -stop-after=machine-cp < %s | FileCheck \ ; RUN: --check-prefix=64BIT %s -define i64 @call_divdi3(i64 %p, i64 %num) { -entry: - %div = sdiv i64 %p, %num - ret i64 %div -} - -; 32BIT: BL_NOP - -define i64 @call_fixunsdfdi(double %p) { -entry: - %conv = fptoui double %p to i64 - ret i64 %conv -} - -; 32BIT: BL_NOP - -define double @call_floatundidf(i64 %p) { -entry: - %conv = uitofp i64 %p to double - ret double %conv -} - -; 32BIT: BL_NOP - -define float @call_floatundisf(i64 %p) { -entry: - %conv = uitofp i64 %p to float - ret float %conv -} - -; 32BIT: BL_NOP - -define i64 @call_moddi3(i64 %p, i64 %num) { -entry: - %rem = srem i64 %p, %num - ret i64 %rem -} - -; 32BIT: BL_NOP - -define i64 @call_udivdi3(i64 %p, i64 %q) { - %1 = udiv i64 %p, %q - ret i64 %1 -} - -; 32BIT: BL_NOP - -define i64 @call_umoddi3(i64 %p, i64 %num) { -entry: - %rem = urem i64 %p, %num - ret i64 %rem -} - -; 32BIT: BL_NOP - define double @call_ceil(double %n) { entry: %0 = call double @llvm.ceil.f64(double %n) @@ -71,58 +16,3 @@ ; 32BIT: BL_NOP ; 64BIT: BL8_NOP - -define double @call_floor(double %n) { -entry: - %0 = call double @llvm.floor.f64(double %n) - ret double %0 -} - -declare double @llvm.floor.f64(double) - -; 32BIT: BL_NOP -; 64BIT: BL8_NOP - -define void @call_memcpy(i8* %p, i8* %q, i32 %n) { -entry: - call void @llvm.memcpy.p0i8.p0i8.i32(i8* %p, i8* %q, i32 %n, i1 false) - ret void -} - -declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) - -; 32BIT: BL_NOP -; 64BIT: BL8_NOP - -define void @call_memmove(i8* %p, i8* %q, i32 %n) { -entry: - call void @llvm.memmove.p0i8.p0i8.i32(i8* %p, i8* %q, i32 %n, i1 false) - ret void -} - -declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i1) - -; 32BIT: BL_NOP -; 64BIT: BL8_NOP - -define void @call_memset(i8* %p, i8 %q, i32 %n) #0 { -entry: - call void @llvm.memset.p0i8.i32(i8* %p, i8 %q, i32 %n, i1 false) - ret void -} - -declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) - -; 32BIT: BL_NOP -; 64BIT: BL8_NOP - -define double @call_round(double %n) { -entry: - %0 = call double @llvm.round.f64(double %n) - ret double %0 -} - -declare double @llvm.round.f64(double) - -; 32BIT: BL_NOP -; 64BIT: BL8_NOP