aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-05 05:54:46 +0000
committerChris Lattner <sabre@nondot.org>2009-10-05 05:54:46 +0000
commitfdd87907185162d3ffec237c426530d63c23bcca (patch)
tree764fe48a8294ae462f454fb0fd7f82e4f03bacca /llvm/lib/CodeGen/MachineInstr.cpp
parent3a2e503e33efdbf723f95fc592fe62335248b078 (diff)
downloadllvm-fdd87907185162d3ffec237c426530d63c23bcca.zip
llvm-fdd87907185162d3ffec237c426530d63c23bcca.tar.gz
llvm-fdd87907185162d3ffec237c426530d63c23bcca.tar.bz2
strength reduce a ton of type equality tests to check the typeid (Through
the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 3d1c221..a3560a7 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -239,7 +239,7 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
OS << getImm();
break;
case MachineOperand::MO_FPImmediate:
- if (getFPImm()->getType() == Type::getFloatTy(getFPImm()->getContext()))
+ if (getFPImm()->getType()->isFloatTy())
OS << getFPImm()->getValueAPF().convertToFloat();
else
OS << getFPImm()->getValueAPF().convertToDouble();