summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorKai Nacke <kai.nacke@redstar.de>2013-09-19 22:36:39 +0000
committerKai Nacke <kai.nacke@redstar.de>2013-09-19 22:36:39 +0000
commit4eaf6444fa885dce03af1092d7b797ad918e997d (patch)
treeb56589a403378d867b474ded245286ac52ad8b22 /clang/lib/Sema
parent91a95a590a566ecf2906744b6d612a27e33be08d (diff)
downloadbcm5719-llvm-4eaf6444fa885dce03af1092d7b797ad918e997d.tar.gz
bcm5719-llvm-4eaf6444fa885dce03af1092d7b797ad918e997d.zip
PR16726: extend rol/ror matching
C-like languages promote types like unsigned short to unsigned int before performing an arithmetic operation. Currently the rotate matcher in the DAGCombiner does not consider this situation. This commit extends the DAGCombiner in the way that the pattern (or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y)))) is folded into ([az]ext (rotl x, y)) The matching is restricted to aext and zext because in this cases the upper bits are either undefined or known. Test case is included. This fixes PR16726. llvm-svn: 191045
Diffstat (limited to 'clang/lib/Sema')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud