LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 28984 - SCEV not sufficiently invalidated - Results in non-dominating expressions to be inserted
Summary: SCEV not sufficiently invalidated - Results in non-dominating expressions to ...
Status: RESOLVED FIXED
Alias: None
Product: Polly
Classification: Unclassified
Component: Optimizer (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Polly Development Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 11:32 PDT by Tobias Grosser
Modified: 2016-08-18 05:46 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Grosser 2016-08-15 11:32:37 PDT
opt  -polly-process-unprofitable  -polly-remarks-minimal  -S -polly-codegen 
 -polly-invariant-load-hoisting=false test/Isl/CodeGen/hoisted_load_escapes_through_phi.ll

fails with r78673:

  %tmp1 = load i32, i32* @cont_STACKPOINTER, align 4
  %0 = sext i32 %tmp1 to i64
Polly generated function could not be verified. Add -polly-codegen-verify=false to disable this assertion.

The test case contains two scops in a row, where the first scop is code generated "before" the second scop. Unfortunately the second scop references the first scop in some of the SCEV expressions used, which results in parameter values of the second scop referencing an instruction ('tmp1') which is not any more dominating the second scop.

We probably need to run SE.forgetValue() for all instruction in the original scop region. However, this might conflict with the caching of SCEV instructions in ScopDetection.
Comment 1 Tobias Grosser 2016-08-18 05:46:41 PDT
Fixed in r279047.