facebook / facebook/hhvm

aarch64 - extra sign/zero extension around function calls

Open
#8,318 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

HipHop VM 3.28.0-dev (rel)
Compiler: heads/master-0-g291e625eb10d94b371c4bbf0339635b576b97d24
Repo schema: 29cde94227e1479a6f7c81f14551c6a11c855531

### Operating System and Version

ubuntu 16.04
Linux lab 4.15.0-15-generic #16~16.04.1-Ubuntu SMP Thu Apr 5 12:23:24 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

### Standalone code, or other way to reproduce the problem

Any oss-performance test.

### Actual result

The return type of the builtin call is known. The called function should be responsible for conditioning
the return value.

```
#54 - should be able to use call return type to avoid zero-extension
.
47197 (38) t11:Bool = CallBuiltin<0,function_exists,writeLocals,readLocals,needsCallerFrame> t0:FramePtr, t1:StkPtr, t9:PtrToFrameGen, t10:Bool -> B24
47198 Main:
47199 0xf6003e8 d3401c01 uxtb x1, w0
47200 0xf6003ec d10043a0 sub x0, x29, #0x10 (16)
47201 0xf6003f0 d2855c12 movz x18, #0x2ae0
47202 0xf6003f4 f2a05b12 movk x18, #0x2d8, lsl #16
47203 0xf6003f8 d63f0240 blr x18
47204
47205 -> B25
47206
47207 B25: [profCount=1] (preds B18)
47208 (39) Jmp t11:Bool -> B9
47209 Main:
47210 0xf6003fc d3401c00 uxtb x0, w0 //<<---
47211 0xf600400 aa0003f3 mov x19, x0
```

### Expected result

One less instruction per call.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.