-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issuePerformance related issue
Milestone
Description
PR dotnet/coreclr#7943 fixed this issue for == and != against zero. Still the following cases can be optimized when op1 is known to set ZF and SF flags.
// TODO-CQ: We can optimize compare against zero in the
// following cases by generating the branch as indicated
// against each case.
// 1) unsigned compare
// < 0 - always FALSE
// <= 0 - ZF=1 and jne
// > 0 - ZF=0 and je
// >= 0 - always TRUE
//
// 2) signed compare
// < 0 - SF=1 and js
// >= 0 - SF=0 and jns
category:cq
theme:basic-cq
skill-level:intermediate
cost:medium
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issuePerformance related issue