Changeset 278769 in webkit
- Timestamp:
- Jun 11, 2021, 11:26:55 AM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
b3/air/AirOpcode.opcodes (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r278734 r278769 1 2021-06-11 Yijia Huang <yijia_huang@apple.com> 2 3 Air ARM64 sub32 opcode should indicate that it zero-extends its result 4 https://bugs.webkit.org/show_bug.cgi?id=226849 5 6 Reviewed by Saam Barati. 7 8 Sub32 was previously not saying that its result is zero defined. However, 9 sub32 on arm64 architectures zero defines its result, so the top 32 bits 10 are zeroed. The issue with this is what we were not eliding provably 11 redundant zero extend operations. 12 13 For example: 14 // B3 IR 15 @0 = Trunc(ArgumentReg(0)) 16 @1 = Trunc(ArgumentReg(1)) 17 @2 = Sub(@0, @1) 18 @3 = ZExt32(@2) // i64 19 @4 = Return(@3) or Store(@3, @x) 20 21 // Old optimized Air IR 22 Sub32 %x0, %x1, %x0, b@2 23 Move32 %x0, %x0, b@3 24 Ret64 %x0, b@4 or Move %x0, (%x), b@4 25 26 To remove that redundant zero extend instruction (Move32), Air arm64 27 sub32 opcode should indicate that it zero-extends its result. 28 29 // New optimized Air IR 30 Sub32 %x0, %x1, %x0, b@2 31 Ret64 %x0, b@6 or Move %x0, (%x), b@4 32 33 * b3/air/AirOpcode.opcodes: 34 1 35 2021-06-10 Keith Miller <keith_miller@apple.com> 2 36 -
trunk/Source/JavaScriptCore/b3/air/AirOpcode.opcodes
r270214 r278769 178 178 x86: Tmp, Index 179 179 180 arm64: Sub32 U:G:32, U:G:32, D:G:32180 arm64: Sub32 U:G:32, U:G:32, ZD:G:32 181 181 Tmp, Tmp, Tmp 182 182
Note:
See TracChangeset
for help on using the changeset viewer.