diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-08-21 22:14:17 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-08-21 22:14:17 +0000 |
commit | 5464a92861c76f1e091cd219dee71ce9858eb195 (patch) | |
tree | 291f446d7a329f2a8ccfe0456347d6b0a3a74562 /lib | |
parent | dfdf7f44a9a3c3f27d3d836b0f25daf08db5e418 (diff) | |
download | external_llvm-5464a92861c76f1e091cd219dee71ce9858eb195.zip external_llvm-5464a92861c76f1e091cd219dee71ce9858eb195.tar.gz external_llvm-5464a92861c76f1e091cd219dee71ce9858eb195.tar.bz2 |
R600: Remove unnecessary casts
Spotted by Bill Wendling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/R600/AMDGPUISelLowering.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp index dd8b73f..692b3b7 100644 --- a/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/lib/Target/R600/AMDGPUISelLowering.cpp @@ -115,14 +115,13 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) : setOperationAction(ISD::VSELECT, MVT::v2f32, Expand); setOperationAction(ISD::VSELECT, MVT::v4f32, Expand); - static const int IntTypes[] = { - (int)MVT::v2i32, - (int)MVT::v4i32 + static const MVT::SimpleValueType IntTypes[] = { + MVT::v2i32, MVT::v4i32 }; const size_t NumIntTypes = array_lengthof(IntTypes); for (unsigned int x = 0; x < NumIntTypes; ++x) { - MVT::SimpleValueType VT = (MVT::SimpleValueType)IntTypes[x]; + MVT::SimpleValueType VT = IntTypes[x]; //Expand the following operations for the current type by default setOperationAction(ISD::ADD, VT, Expand); setOperationAction(ISD::AND, VT, Expand); @@ -142,14 +141,13 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) : setOperationAction(ISD::XOR, VT, Expand); } - static const int FloatTypes[] = { - (int)MVT::v2f32, - (int)MVT::v4f32 + static const MVT::SimpleValueType FloatTypes[] = { + MVT::v2f32, MVT::v4f32 }; const size_t NumFloatTypes = array_lengthof(FloatTypes); for (unsigned int x = 0; x < NumFloatTypes; ++x) { - MVT::SimpleValueType VT = (MVT::SimpleValueType)FloatTypes[x]; + MVT::SimpleValueType VT = FloatTypes[x]; setOperationAction(ISD::FADD, VT, Expand); setOperationAction(ISD::FDIV, VT, Expand); setOperationAction(ISD::FFLOOR, VT, Expand); |