Re: [PATCH, i386]: Generate BT with immedate operand

2015-07-08 Thread Uros Bizjak
On Tue, Jul 7, 2015 at 8:35 PM, Uros Bizjak wrote: > BT has *slightly* higher latency than TEST (0.33 vs. 0.25 cycles on a > modern processor), so I have limited the conversion to -Os in case the > bit-test is in the low 32 bits. A small update, in case of -Os, unpatched compiler generates andb

[PATCH, i386]: Generate BT with immedate operand

2015-07-07 Thread Uros Bizjak
Hello! After recent x86 EXTZ/EXTZV improvements, we can extend BT splitters to generate BT instruction with immediate operands. The improvement can be seen with attached testcases. The benefit is obvious for BT with immediates 32 <= n <= 63: 0: 48 b8 00 00 00 00 00movabs $0x1000