From 2a4cb68ea68a6544c43ad8c461b0e93386496080 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 19 Jul 2004 13:25:02 +0000 Subject: [PATCH] bug 122: Simplify a conditional operator for a constant result from GV->isNullValue() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15001 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SparcV9/SparcV9InstrInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp index f672b5dc6d5..c2ffceed6e9 100644 --- a/lib/Target/SparcV9/SparcV9InstrInfo.cpp +++ b/lib/Target/SparcV9/SparcV9InstrInfo.cpp @@ -62,8 +62,7 @@ SparcV9InstrInfo::ConvertConstantToIntType(const TargetMachine &target, // GlobalValue: no conversions needed: get value and return it if (const GlobalValue* GV = dyn_cast(V)) { isValidConstant = true; // may be overwritten by recursive call - return GV->isNullValue() ? 0 : - ConvertConstantToIntType(target, GV, destType, isValidConstant); + return ConvertConstantToIntType(target, GV, destType, isValidConstant); } // ConstantBool: no conversions needed: get value and return it