aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/IR
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-07-30 22:02:14 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-07-30 22:02:14 +0000
commit485c7fd76b32a69c46782a715682ed8831b0873b (patch)
tree8af5394070afbcb779a16e1ca359651a1309349b /unittests/IR
parent6aebd5facbbc80787270cc1b18bffbf6c6f655e8 (diff)
downloadexternal_llvm-485c7fd76b32a69c46782a715682ed8831b0873b.zip
external_llvm-485c7fd76b32a69c46782a715682ed8831b0873b.tar.gz
external_llvm-485c7fd76b32a69c46782a715682ed8831b0873b.tar.bz2
Revert "Remove isCastable since nothing uses it now"
Apparently dragonegg uses it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/InstructionsTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/IR/InstructionsTest.cpp b/unittests/IR/InstructionsTest.cpp
index 8f4f194..34d662d 100644
--- a/unittests/IR/InstructionsTest.cpp
+++ b/unittests/IR/InstructionsTest.cpp
@@ -149,6 +149,11 @@ TEST(InstructionsTest, CastInst) {
const Constant* c8 = Constant::getNullValue(V8x8Ty);
const Constant* c64 = Constant::getNullValue(V8x64Ty);
+ EXPECT_TRUE(CastInst::isCastable(V8x8Ty, X86MMXTy));
+ EXPECT_TRUE(CastInst::isCastable(X86MMXTy, V8x8Ty));
+ EXPECT_FALSE(CastInst::isCastable(Int64Ty, X86MMXTy));
+ EXPECT_TRUE(CastInst::isCastable(V8x64Ty, V8x8Ty));
+ EXPECT_TRUE(CastInst::isCastable(V8x8Ty, V8x64Ty));
EXPECT_EQ(CastInst::Trunc, CastInst::getCastOpcode(c64, true, V8x8Ty, true));
EXPECT_EQ(CastInst::SExt, CastInst::getCastOpcode(c8, true, V8x64Ty, true));