Ignore:
Timestamp:
Aug 9, 2017, 3:20:04 PM (21 months ago)
Author:
nmedfort
Message:

Bug fix for DistributivePass?. Minor change to Simplifier to prevent the first conditional assignment of a Var from being combined with its strictly dominating assigned value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/optimizers/pablo_simplifier.cpp

    r5536 r5607  
    203203        assert ("block has a branch but the expression and variable tables were not supplied" && et && vt);
    204204        variables.addNonZero(br->getCondition());
    205         if (LLVM_UNLIKELY(isa<While>(br))) {
    206             for (Var * var : cast<While>(br)->getEscaped()) {
    207                 variables.put(var, var);
    208             }
     205        for (Var * var : br->getEscaped()) {
     206            variables.put(var, var);
    209207        }
    210208    }
     
    255253
    256254            if (LLVM_LIKELY(isa<If>(br))) {
    257                 if (LLVM_UNLIKELY(variables.isNonZero(br->getCondition()))) {
     255                if (LLVM_UNLIKELY(variables.isNonZero(cond))) {
    258256                    stmt = flatten(br);
    259257                    continue;
Note: See TracChangeset for help on using the changeset viewer.