hhvm
hhvm copied to clipboard
aarch64 - remove useless uxtb instructions
This change removes unneeded zero-extend instructions seen in various benchmarks. A less thorough version of this had been previously submitted in PR#7707.
Here is an example from hphp/test/slow/comparisons/all_type_comparison_test.php
Before
553: CGetL L:3
(27) t5:Bool = LdLoc<Bool,3> t0:FramePtr
Main:
0x27e020dc 385c03a0 ldurb w0, [x29, #-64]
--- bc 557, fp 0, spOff 8 (test_pair)
557: Cmp
(37) t9:Int = CmpBool false, t5:Bool
Main:
0x27e020e0 52800001 movz w1, #0x0
0x27e020e4 d3401c21 uxtb x1, w1 //<<---
0x27e020e8 d3401c00 uxtb x0, w0 //<<---
0x27e020ec cb000021 sub x1, x1, x0
After
553: CGetL L:3
(27) t5:Bool = LdLoc<Bool,3> t0:FramePtr
Main:
0x31002544 385c03a0 ldurb w0, [x29, #-64]
--- bc 557, fp 0, spOff 8 (test_pair)
557: Cmp
(37) t9:Int = CmpBool false, t5:Bool
Main:
0x31002548 aa1f03e1 mov x1, xzr
0x3100254c cb000021 sub x1, x1, x0
The standard regression tests were run with 6 option sets. No new failures
were seen.
@mxw - Hi Max, Can you review?