Skip to content

Commit

Permalink
Revert "[LSR] Avoid UB overflow when examining reuse opportunities"
Browse files Browse the repository at this point in the history
This reverts commit r324943.

Breaking bots, reverting for Gerolf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324958 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
anemet committed Feb 12, 2018
1 parent ddc563a commit 0d1fcac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
5 changes: 0 additions & 5 deletions lib/Transforms/Scalar/LoopStrengthReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3939,11 +3939,6 @@ void LSRInstance::GenerateCrossUseConstantOffsets() {
if (Imms.size() == 1)
continue;

// UB: Check for overflow
int64_t Res;
if (__builtin_saddll_overflow(Imms.begin()->first, std::prev(Imms.end())->first, &Res))
continue;

DEBUG(dbgs() << "Generating cross-use offsets for " << *Reg << ':';
for (const auto &Entry : Imms)
dbgs() << ' ' << Entry.first;
Expand Down
26 changes: 0 additions & 26 deletions test/CodeGen/X86/loop-strength-reduce-overflow-check.ll

This file was deleted.

0 comments on commit 0d1fcac

Please sign in to comment.