Skip to content
  • Chris Lattner's avatar
    Implement the getRegForInlineAsmConstraint method for PPC. With recent · 584a11ae
    Chris Lattner authored
    sdisel changes, this eliminates a ton of copies around common inline asms.
    For example:
    
    int test2(int Y, int X) {
      asm("foo %0, %1" : "=r"(X): "r"(X));
      return X;
    }
    
    now compiles to:
    
    _test2:
            foo r3, r4
            blr
    
    instead of:
    
    _test2:
            mr r2, r4
            foo r2, r2
            mr r3, r2
            blr
    
    GCC produces:
    
    _test2:
            foo r4, r4
            mr r3,r4
            blr
    
    llvm-svn: 31367
    584a11ae
Loading