intfoo(boolcond,inta,intb)=>1+(cond?a:b);// or e.g. "cond ? 1 : 2"
Current codegen:
; Method Program:foo(bool,int,int):int:this (FullOpts)testdl,dljne SHORT G_M62184_IG04moveax,r9djmp SHORT G_M62184_IG05G_M62184_IG04: ;; offset=0x0009moveax,r8dG_M62184_IG05: ;; offset=0x000Cinceaxret; Total bytes of code: 15
Expected: branchless code (cmove)
cc @jakobbotsch @dotnet/jit-contrib
Current codegen:
Expected: branchless code (cmove)
cc @jakobbotsch @dotnet/jit-contrib