Skip to content
  • Chris Lattner's avatar
    Reimplement (part of) the or -> add optimization. Matching 'or' into 'add' · 4fb38d3c
    Chris Lattner authored
    is general goodness because it allows ORs to be converted to LEA to avoid
    inserting copies.  However, this is bad because it makes the generated .s
    file less obvious and gives valgrind heartburn (tons of false positives in
    bitfield code).
    
    While the general fix should be in valgrind, we can at least try to avoid
    emitting ADD instructions that *don't* get promoted to LEA.  This is more
    work because it requires introducing pseudo instructions to represents
    "add that knows the bits are disjoint", but hey, people really love valgrind.
    
    This fixes this testcase:
    https://bugs.kde.org/show_bug.cgi?id=242137#c20
    
    the add r/i cases are coming next.
    
    llvm-svn: 116007
    4fb38d3c
Loading