diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-06 08:20:29 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-06 08:20:29 +0000 |
commit | f4fe016fa15f703fe9c1b932d1e81e2c718521db (patch) | |
tree | 8a1bbd1a5b838080d31e5c93a1817006b8c62318 /lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 68eb509bdc5c7007520d5231cd92de28106236df (diff) |
Notes
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 1dad04bd8f6f4..3b44f56421f4a 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -104,9 +104,12 @@ static int GetDecodedCastOpcode(unsigned Val) { static int GetDecodedBinaryOpcode(unsigned Val, const Type *Ty) { switch (Val) { default: return -1; - case bitc::BINOP_ADD: return Instruction::Add; - case bitc::BINOP_SUB: return Instruction::Sub; - case bitc::BINOP_MUL: return Instruction::Mul; + case bitc::BINOP_ADD: + return Ty->isFPOrFPVector() ? Instruction::FAdd : Instruction::Add; + case bitc::BINOP_SUB: + return Ty->isFPOrFPVector() ? Instruction::FSub : Instruction::Sub; + case bitc::BINOP_MUL: + return Ty->isFPOrFPVector() ? Instruction::FMul : Instruction::Mul; case bitc::BINOP_UDIV: return Instruction::UDiv; case bitc::BINOP_SDIV: return Ty->isFPOrFPVector() ? Instruction::FDiv : Instruction::SDiv; |