-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 SuperPMI
Milestone
Description
https://godbolt.org/z/bvc7Gaq9G
void TernaryOperator(uint x, uint y)
{
// Expected:
// if ((x | y) < 0x10000u)
// or edi, esi
// cmp edi, 65536
// jae void bar(void)
uint a = x < 0x10000u ? 0u : 1u;
uint b = y < 0x10000u ? 0u : 1u;
if ((a | b) != 0) {
Consume(0);
}
}Currently is after OptimizeBools:
[000015] -----+----- * JTRUE void $VN.Void
[000014] J----+-N--- \--* EQ int $103
[000012] -----+----- +--* OR int $102
[000002] N----+---U- | +--* GE int $100
[000000] -----+----- | | +--* LCL_VAR int V01 arg1 u:1 (last use) $80
[000001] -----+----- | | \--* CNS_INT int 0x10000 $43
[000007] N----+---U- | \--* GE int $101
[000005] -----+----- | +--* LCL_VAR int V02 arg2 u:1 (last use) $81
[000006] -----+----- | \--* CNS_INT int 0x10000 $43
[000013] -----+----- \--* CNS_INT int 0 $44Could be:
[000005] -----+----- * JTRUE void $VN.Void
[000004] N----+-N-U- \--* GE int $101
[000002] -----+----- +--* OR int $100
[000000] -----+----- | +--* LCL_VAR int V01 arg1 u:1 (last use) $80
[000001] -----+----- | \--* LCL_VAR int V02 arg2 u:1 (last use) $81
[000003] -----+----- \--* CNS_INT int 0x10000 $44Reactions are currently unavailable
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 SuperPMI