Skip to content
  1. Sep 07, 2008
  2. Sep 06, 2008
  3. Sep 05, 2008
  4. Sep 04, 2008
  5. Sep 03, 2008
  6. Sep 02, 2008
  7. Sep 01, 2008
  8. Aug 31, 2008
    • Bill Wendling's avatar
      Another situation where ROTR is cheaper than ROTL. · 11284ea4
      Bill Wendling authored
      llvm-svn: 55577
      11284ea4
    • Bill Wendling's avatar
      For this pattern, ROTR is the cheaper option. · 4822a7ac
      Bill Wendling authored
      llvm-svn: 55576
      4822a7ac
    • Bill Wendling's avatar
      - Fix comment so that it describes how the code really works: · fc724164
      Bill Wendling authored
         // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
         //   (rotl x, y)
         // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
         //   (rotr x, (sub 32, y))
      
      Example: (x == 0xDEADBEEF and y == 4)
      
          (x << 4) | (x >> 28)
       => 0xEADBEEF0 | 0x0000000D
       => 0xEADBEEFD
      
          (rotl x, 4)
       => 0xEADBEEFD
      
          (rotr x, 28)
       => 0xEADBEEFD
      
      - Fix comment and code for second version. It wasn't using the rot* propertly.
      
         // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> 
         //   (rotr x, y)
         // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) ->
         //   (rotl x, (sub 32, y))
      
          (x << 28) | (x >> 4)
       => 0xD0000000 | 0x0DEADBEE
       => 0xDDEADBEE
      
          (rotl x, 4)
       => 0xEADBEEFD
      
          (rotr x, 28)
       => (0xEADBEEFD)
      
      llvm-svn: 55575
      fc724164
    • Gabor Greif's avatar
      typo · 66ccf603
      Gabor Greif authored
      llvm-svn: 55574
      66ccf603
  9. Aug 30, 2008
Loading