[llvm-commits] [llvm-gcc-4.2] r46064 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Tue Jan 15 23:28:16 PST 2008
Author: void
Date: Wed Jan 16 01:28:16 2008
New Revision: 46064
URL: http://llvm.org/viewvc/llvm-project?rev=46064&view=rev
Log:
Simplify the code to make it more readable.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=46064&r1=46063&r2=46064&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Jan 16 01:28:16 2008
@@ -5492,13 +5492,11 @@
// maintainers removed this in a fit of cleanliness between 4.0
// and 4.2. For now, host and target endianness must match.
- if (BigEndian == FLOAT_WORDS_BIG_ENDIAN) {
- UArr[0] = RealArr[0]; // Long -> int convert
- UArr[1] = RealArr[1];
- } else {
- UArr[0] = RealArr[1]; // Long -> int convert
- UArr[1] = RealArr[0];
- }
+ UArr[0] = RealArr[0]; // Long -> int convert
+ UArr[1] = RealArr[1];
+
+ if (BigEndian != FLOAT_WORDS_BIG_ENDIAN)
+ std::swap(UArr[0], UArr[1]);
return ConstantFP::get(Ty, Ty==Type::FloatTy ? APFloat((float)V)
: APFloat(V));
More information about the llvm-commits
mailing list