Re: [PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD

2024-05-22 Thread Richard Biener
om; Tamar Christina > > ; richard.guent...@gmail.com; Pan Li > > > > Subject: [PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD > > > > From: Pan Li > > > > This patch would like to support the branch form for unsigned > > SAT_ADD. For exa

RE: [PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD

2024-05-20 Thread Tamar Christina
Hi Pan, > -Original Message- > From: pan2...@intel.com > Sent: Monday, May 20, 2024 12:01 PM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; Pan Li > > Subject: [PATCH v1 1/2] Match:

[PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD

2024-05-20 Thread pan2 . li
From: Pan Li This patch would like to support the branch form for unsigned SAT_ADD. For example as below: uint64_t sat_add (uint64_t x, uint64_t y) { return (uint64_t) (x + y) >= x ? (x + y) : -1; } Different to the branchless version, we leverage the simplify to convert the branch version