[PATCH] D47735: [DAGCombiner] Create rotates more aggressively
    Krzysztof Parzyszek via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb 20 14:02:09 PST 2019
    
    
  
kparzysz added a comment.
One goal was to be able to generate rol-and-accumulate instruction (on Hexagon), specifically for the accumulate operation being | (see `f11` in rotate.ll).  For the C code we still don't generate it:
  unsigned blah(unsigned x, unsigned s) {
    return s | (x << 27) | (x >> 5);
  }
Using `clang -S -target hexagon -O2 fs.c -o -` gives
  {
          r0 |= asl(r1,#25)
  }
  {
          r0 |= lsr(r1,#7)
          jumpr r31
  }
What we'd want is `r0 |= rol(r1,#7)`.
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D47735/new/
https://reviews.llvm.org/D47735
    
    
More information about the llvm-commits
mailing list