make it clear that this is always a zext
[oota-llvm.git] / lib / Transforms / IPO / GlobalOpt.cpp
index d6a8a85800cff1dcc1065b89a9844fe851da8e8d..af3bf6a887cba5360b6af21e2549398583bb7902 100644 (file)
@@ -1177,7 +1177,7 @@ static void ShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
       LoadInst *NLI = new LoadInst(NewGV, Name+".b", LI);
       Value *NSI;
       if (IsOneZero)
-        NSI = CastInst::createInferredCast(NLI, LI->getType(), Name, LI);
+        NSI = new ZExtInst(NLI, LI->getType(), Name, LI);
       else
         NSI = new SelectInst(NLI, OtherVal, InitVal, Name, LI);
       LI->replaceAllUsesWith(NSI);