[llvm] [AMDGPU] Calc IsVALU correctly during UADDO/USUBO selection (PR #159814)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 02:00:03 PDT 2025
================
@@ -0,0 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=amdgcn-amd-amdpal -stop-after=amdgpu-isel < %s | FileCheck -check-prefixes=GCN-ISEL %s
+; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck %s
+; Ensure that S_UADDO_PSEUDO is selected when carryout user is S_ADD_CO_PSEUDO
+
+; GCN-ISEL-LABEL: name: s_uaddo_pseudo
+; GCN-ISEL-LABEL: body:
+; GCN-ISEL: S_UADDO_PSEUDO
+; GCN-ISEL: S_ADD_CO_PSEUDO
+
+define amdgpu_ps i32 @s_uaddo_pseudo(i32 inreg %val0, i32 inreg %val1) {
+; CHECK-LABEL: s_uaddo_pseudo:
+; CHECK: ; %bb.0:
+; CHECK-NEXT: s_add_i32 s0, s0, s1
----------------
jayfoad wrote:
Not your fault but this instruction detects signed overflow, not unsigned overflow! Can you please fix this? Looks like it is original sin from https://reviews.llvm.org/D78091 @alex-t
https://github.com/llvm/llvm-project/pull/159814
More information about the llvm-commits
mailing list