1 /* PR tree-optimization/86401 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */ 4 /* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 2 "optimized" } } */ 5 6 unsigned int f1(unsigned int x,unsigned int s)7f1 (unsigned int x, unsigned int s) 8 { 9 unsigned int t = s % (__CHAR_BIT__ * __SIZEOF_INT__); 10 return (x << t) | (x >> (((__CHAR_BIT__ * __SIZEOF_INT__) - t) % (__CHAR_BIT__ * __SIZEOF_INT__))); 11 } 12 13 unsigned int f2(unsigned int x,unsigned int s)14f2 (unsigned int x, unsigned int s) 15 { 16 int n = __CHAR_BIT__ * __SIZEOF_INT__; 17 unsigned int t = s % n; 18 return (x << t) | (x >> ((n - t) % n)); 19 } 20