diff --git a/.pick_status.json b/.pick_status.json index 54c5b06e1f3..1905215cc26 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -679,7 +679,7 @@ "description": "nir: Fix qsort comparator function", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "523a28d3fe0dd371ae01b7353f263a6541480d89" }, diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c index 9ce5793594e..032fcbcb918 100644 --- a/src/compiler/nir/nir_instr_set.c +++ b/src/compiler/nir/nir_instr_set.c @@ -212,7 +212,7 @@ cmp_phi_src(const void *data1, const void *data2) { nir_phi_src *src1 = *(nir_phi_src **)data1; nir_phi_src *src2 = *(nir_phi_src **)data2; - return src1->pred - src2->pred; + return src1->pred > src2->pred ? 1 : (src1->pred == src2->pred ? 0 : -1); } static uint32_t