diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
commit | 35315d065b74537c1290767d0b8da9ca2036fdea (patch) | |
tree | e00a09050e0a4552c4a0ecb533c550fea4daa41a /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | b54605b8e22fa620bb843637cc15bc74aac9aed5 (diff) | |
download | bcm5719-llvm-35315d065b74537c1290767d0b8da9ca2036fdea.tar.gz bcm5719-llvm-35315d065b74537c1290767d0b8da9ca2036fdea.zip |
enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.
Nothing forms exact udivs yet though. This is progress on PR8862
llvm-svn: 124992
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 702a611cbe5..f8ef8c668c4 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -470,9 +470,10 @@ static uint64_t GetOptimizationFlags(const Value *V) { Flags |= 1 << bitc::OBO_NO_SIGNED_WRAP; if (OBO->hasNoUnsignedWrap()) Flags |= 1 << bitc::OBO_NO_UNSIGNED_WRAP; - } else if (const SDivOperator *Div = dyn_cast<SDivOperator>(V)) { - if (Div->isExact()) - Flags |= 1 << bitc::SDIV_EXACT; + } else if (const PossiblyExactOperator *PEO = + dyn_cast<PossiblyExactOperator>(V)) { + if (PEO->isExact()) + Flags |= 1 << bitc::PEO_EXACT; } return Flags; |