[PATCH] D151358: [LegalizeTypes] Improve expansion of wide SMIN/SMAX/UMIN/UMAX
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 11:54:02 PDT 2023
efriedma added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/min.ll:552
-; EG: MIN_UINT
-; EG: MIN_UINT
+; EG: SETE_INT
+; EG: SETGT_UINT
----------------
Looked more carefully at the output; I don't think this is actually a regression, the total instructions appears the same.
Before:
```
LSHR * T0.X, KC0[2].Y, literal.x,
2(2.802597e-45), 0(0.000000e+00)
SETGE_UINT * T0.W, KC0[3].X, KC0[3].Z,
CNDE_INT T0.Z, PV.W, KC0[2].W, KC0[3].Y,
MIN_UINT * T0.W, KC0[2].W, KC0[3].Y,
SETE_INT * T1.W, KC0[3].X, KC0[3].Z,
CNDE_INT T1.X, PV.W, T0.Z, T0.W,
MIN_UINT * T1.Y, KC0[3].X, KC0[3].Z,
```
After:
```
SETE_INT T0.Z, KC0[3].X, KC0[3].Z,
SETGT_UINT * T0.W, KC0[3].Z, KC0[3].X,
SETGT_UINT * T1.W, KC0[3].Y, KC0[2].W,
CNDE_INT * T0.W, T0.Z, T0.W, PV.W,
CNDE_INT * T0.Y, PV.W, KC0[3].Z, KC0[3].X,
CNDE_INT * T0.X, T0.W, KC0[3].Y, KC0[2].W,
LSHR * T1.X, KC0[2].Y, literal.x,
2(2.802597e-45), 0(0.000000e+00)
```
================
Comment at: llvm/test/CodeGen/AMDGPU/r600-legalize-umax-bug.ll:23
+; CHECK-NEXT: 4(5.605194e-45), 0(0.000000e+00)
+; CHECK-NEXT: CNDE_INT T0.X, PV.W, literal.x, T0.X,
; CHECK-NEXT: MOV T0.Y, 0.0,
----------------
Regression.
================
Comment at: llvm/test/CodeGen/ARM/fpclamptosat.ll:2205
; SOFT-NEXT: @ %bb.1: @ %entry
-; SOFT-NEXT: movs r0, #0
-; SOFT-NEXT: mvns r0, r0
+; SOFT-NEXT: mvns r0, r2
; SOFT-NEXT: .LBB28_2: @ %entry
----------------
Regression. Might need to special-case the constant 4294967295.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151358/new/
https://reviews.llvm.org/D151358
More information about the llvm-commits
mailing list