[GlobalISel] Simplify extended add/sub to add/sub with carry
authorJay Foad <jay.foad@amd.com>
Mon, 12 Sep 2022 15:32:25 +0000 (16:32 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 12 Sep 2022 16:05:44 +0000 (17:05 +0100)
commit210e6a993dd518703ebc6438539c000a012414f8
treecc2899c7d5fa6c8f0bdf3211a80a85ea2fd229cb
parent6394ad4421bcea87ac3112bfd41505d337a4e5b6
[GlobalISel] Simplify extended add/sub to add/sub with carry

Simplify extended add/sub (with carry-in and carry-out) to add/sub with
carry (with carry-out only) if carry-in is known to be zero.

Differential Revision: https://reviews.llvm.org/D133702
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll