From: Reid Spencer Date: Wed, 3 Jan 2007 17:24:11 +0000 (+0000) Subject: Remove two useless bit casts. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f54ad97a4e47e70ad74c16e5f84aa25f17c35cb2;p=oota-llvm.git Remove two useless bit casts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32839 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 6e95e89e8e0..4a0c1e78c6d 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -188,14 +188,8 @@ bool X86TargetAsmInfo::LowerToBSwap(CallInst *CI) const { Function *Int = M->getOrInsertFunction(IntName, Ty, Ty, (Type*)0); Value *Op = CI->getOperand(1); - if (CI->getOperand(1)->getType() != Ty) - Op = new BitCastInst(Op, Ty, Op->getName(), CI); - Op = new CallInst(Int, Op, CI->getName(), CI); - if (Op->getType() != CI->getType()) - Op = new BitCastInst(Op, CI->getType(), Op->getName(), CI); - CI->replaceAllUsesWith(Op); CI->eraseFromParent(); return true;