Skip to content
  • Dan Gohman's avatar
    Teach SCEVExpander's visitAddRecExpr to reuse an existing canonical · 426901aa
    Dan Gohman authored
    induction variable when the addrec to be expanded does not require
    a wider type. This eliminates the need for IndVarSimplify to
    micro-manage SCEV expansions, because SCEVExpander now
    automatically expands them in the form that IndVarSimplify considers
    to be canonical. (LSR still micro-manages its SCEV expansions,
    because it's optimizing for the target, rather than for
    other optimizations.)
    
    Also, this uses the new getAnyExtendExpr, which has more clever
    expression simplification logic than the IndVarSimplify code it
    replaces, and this cleans up some ugly expansions in code such as
    the included masked-iv.ll testcase.
    
    llvm-svn: 73294
    426901aa
Loading