dotnet/runtime

JIT: missing opportunities in constant folding around bitwise ops

オープン

#95,747 opened on 2023/12/07

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-CodeGen-coreclrhelp wantedin-pr

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

int Test(int x, int y) => (x | 5) | (y | 3); // E.g. Enums

Current asm:

; Method Program:Test(int,int):int:this (FullOpts)
       or       edx, 5
       mov      eax, edx
       or       eax, r8d
       or       eax, 3
       ret      
; Total bytes of code: 12

Expected asm:

       mov      eax, edx
       or       eax, r8d
       or       eax, 7
       ret      
; Total bytes of code: 9

コントリビューターガイド