diff options
author | Lang Hames <lhames@gmail.com> | 2011-07-09 00:25:11 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2011-07-09 00:25:11 +0000 |
commit | bd1828c6ed8e699dc3efe69271e58085f35a5db3 (patch) | |
tree | 46dd98626683c67c5ae06071689e7f5e18ccf97d /lib/Transforms/Scalar/GVN.cpp | |
parent | 56573cc1aee419b5cc9e3446a59a73577bf26fac (diff) | |
download | external_llvm-bd1828c6ed8e699dc3efe69271e58085f35a5db3.zip external_llvm-bd1828c6ed8e699dc3efe69271e58085f35a5db3.tar.gz external_llvm-bd1828c6ed8e699dc3efe69271e58085f35a5db3.tar.bz2 |
Added recognition for signed add/sub/mul with overflow intrinsics to GVN as per Chris and Frits suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index e6bc77f..87b7317 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -173,12 +173,15 @@ Expression ValueTable::create_extractvalue_expression(ExtractValueInst *EI) { // is we'll synthesize a semantically equivalent expression instead on // an extract value expression. switch (I->getIntrinsicID()) { + case Intrinsic::sadd_with_overflow: case Intrinsic::uadd_with_overflow: e.opcode = Instruction::Add; break; + case Intrinsic::ssub_with_overflow: case Intrinsic::usub_with_overflow: e.opcode = Instruction::Sub; break; + case Intrinsic::smul_with_overflow: case Intrinsic::umul_with_overflow: e.opcode = Instruction::Mul; break; |