diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-04-29 08:07:20 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-04-29 08:07:20 +0000 |
commit | 231a68cc22aa7b9acb567008813ea2f8352753da (patch) | |
tree | 12b959d6af455895864dc51762f3b0dff6a3e0fe /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | |
parent | 3ed9f6ebdeebcf770e20843bfb875f1f3c5f28f0 (diff) | |
download | bcm5719-llvm-231a68cc22aa7b9acb567008813ea2f8352753da.tar.gz bcm5719-llvm-231a68cc22aa7b9acb567008813ea2f8352753da.zip |
[InstCombine] Propagate operand bundles
We neglected to transfer operand bundles for some transforms. These
were found via inspection, I'll try to come up with some test cases.
llvm-svn: 268010
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 826037d5af8..2327ba4995c 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -1401,8 +1401,11 @@ Instruction *InstCombiner::visitFPTrunc(FPTruncInst &CI) { Function *Overload = Intrinsic::getDeclaration( CI.getModule(), II->getIntrinsicID(), IntrinsicType); + SmallVector<OperandBundleDef, 1> OpBundles; + II->getOperandBundlesAsDefs(OpBundles); + Value *Args[] = { InnerTrunc }; - return CallInst::Create(Overload, Args, II->getName()); + return CallInst::Create(Overload, Args, OpBundles, II->getName()); } } } |