Skip to content
  • Chris Lattner's avatar
    make GVN work better when TD is not around: · 8ed7bef4
    Chris Lattner authored
    "In the existing code, if the load and the value to replace it with are
    of different types *and* target data is available, it tries to use the
    target data to coerce the replacement value to the type of the load.
    Otherwise, it skips all effort to handle the type mismatch and just
    feeds the wrongly-typed replacement value to replaceAllUsesWith, which
    triggers an assertion.
    
    The patch replaces it with an outer if checking for type mismatch, and
    an inner if-else that checks whether target data is available and, if
    not, returns false rather than trying to replace the load."
    
    Patch by Kenneth Uildriks!
    
    llvm-svn: 84739
    8ed7bef4
Loading