llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Loop Reduce] Assertion failure due to invalid canonicalization for formula

Open annamthomas opened this issue 9 years ago • 2 comments

Bugzilla Link 33077
Resolution FIXED
Resolved on May 18, 2017 12:22
Version trunk
OS All
Attachments Input IR for loop-reduce
CC @qcolombet

Extended Description

Testcase causing an assertion failure in formula canonicalization in LSR. This was added in patch: https://reviews.llvm.org/rL295884

Assertion failed: (F.isCanonical(L) && "Invalid canonical representation"), function InsertFormula, Transforms/Scalar/LoopStrengthReduce.cpp, line 1431

Added a test case reduced using bugpoint. By reverting rL295884, the test case passes.

Reproduce: opt -loop-reduce bugpoint.ll

annamthomas avatar May 17 '17 17:05 annamthomas

Wei fixed it in r303361

qcolombet avatar May 18 '17 19:05 qcolombet

I'm guessing we are missing a call to Canonicalize. I leave the exact investigation to Wei.

qcolombet avatar May 18 '17 19:05 qcolombet