bug 122:
authorReid Spencer <rspencer@reidspencer.com>
Mon, 19 Jul 2004 13:25:02 +0000 (13:25 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 19 Jul 2004 13:25:02 +0000 (13:25 +0000)
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

index f672b5dc6d5b35e9de56ad0375d3e5c28fbbe6fe..c2ffceed6e9af85a918039e111aced6440545c1a 100644 (file)
@@ -62,8 +62,7 @@ SparcV9InstrInfo::ConvertConstantToIntType(const TargetMachine &target,
   // GlobalValue: no conversions needed: get value and return it
   if (const GlobalValue* GV = dyn_cast<GlobalValue>(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