diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-09-12 11:05:42 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-09-12 11:05:42 +0000 |
commit | 1b7730e7e87480dbc330aeb9e79f4899df2c9fe1 (patch) | |
tree | 83a3633ea41596d5df6b10d90d6137155ce280e4 /lib/CodeGen | |
parent | 0810e2be8fa9a97519b8e3406e8f67645738c29b (diff) | |
download | clang-1b7730e7e87480dbc330aeb9e79f4899df2c9fe1.tar.gz |
[MS-InlineAsm] Fix cast assertion with vector spills (PR34021)
Differential Revision: https://reviews.llvm.org/D37448
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 3bc68899dd..6a78865fc9 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -2194,7 +2194,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { llvm::IntegerType::get(getLLVMContext(), (unsigned)TmpSize)); Tmp = Builder.CreateTrunc(Tmp, TruncTy); } else if (TruncTy->isIntegerTy()) { - Tmp = Builder.CreateTrunc(Tmp, TruncTy); + Tmp = Builder.CreateZExtOrTrunc(Tmp, TruncTy); } else if (TruncTy->isVectorTy()) { Tmp = Builder.CreateBitCast(Tmp, TruncTy); } |