1f08c3bdfSopenharmony_ci// If (t >> S) is simplified into (x >> S) 2f08c3bdfSopenharmony_ci// then the whole expression will be 0. 3f08c3bdfSopenharmony_ci// The test is only interesting if the sub-expression 4f08c3bdfSopenharmony_ci// (x & M) is referenced more than once 5f08c3bdfSopenharmony_ci// (because otherwise other simplifications apply). 6f08c3bdfSopenharmony_ciunsigned lsr_and1(unsigned x) 7f08c3bdfSopenharmony_ci{ 8f08c3bdfSopenharmony_ci unsigned t = (x & 0xfffff000); 9f08c3bdfSopenharmony_ci return ((t >> 12) ^ (x >> 12)) & t; 10f08c3bdfSopenharmony_ci} 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_ci/* 13f08c3bdfSopenharmony_ci * check-name: lsr-and1 14f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file 15f08c3bdfSopenharmony_ci * 16f08c3bdfSopenharmony_ci * check-output-ignore 17f08c3bdfSopenharmony_ci * check-output-contains: ret\\..*\\$0$ 18f08c3bdfSopenharmony_ci */ 19