[llvm-commits] [llvm-gcc-4.2] r128016 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Devang Patel
dpatel at apple.com
Mon Mar 21 13:31:51 PDT 2011
Author: dpatel
Date: Mon Mar 21 15:31:50 2011
New Revision: 128016
URL: http://llvm.org/viewvc/llvm-project?rev=128016&view=rev
Log:
Simplify.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=128016&r1=128015&r2=128016&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Mon Mar 21 15:31:50 2011
@@ -1565,17 +1565,8 @@
(int) GET_MODE_SIZE(Mode);
if (Bytes==8 && Class[0] == X86_64_POINTER_CLASS)
return Type::getInt8PtrTy(Context);
- switch (Bytes) {
- case 8: return Type::getInt64Ty(Context);
- case 7: return Type::getIntNTy(Context, 7*8);
- case 6: return Type::getIntNTy(Context, 6*8);
- case 5: return Type::getIntNTy(Context, 5*8);
- case 4: return Type::getInt32Ty(Context);
- case 3: return Type::getIntNTy(Context, 3*8);
- case 2: return Type::getInt16Ty(Context);
- case 1: return Type::getInt8Ty(Context);
- default: assert (0 && "Unexpected type!");
- }
+ assert (Bytes <= 8 && "Unexpected type!");
+ return Type::getIntNTy(Context, Bytes*8);
}
assert(0 && "Unexpected type!");
}
More information about the llvm-commits
mailing list