[PATCH] InstCombine: Recognize an unsigned mul with overflow idiom into umul.
Benjamin Kramer
benny.kra at gmail.com
Tue Mar 25 08:23:29 PDT 2014
On 19.03.2014, at 17:47, Erik Verbruggen <erik.verbruggen at me.com> wrote:
> [PATCH] InstCombine: Recognize an unsigned mul with overflow idiom into umul.
>
> (a*b) <u a --> llvm.umul.with.overflow.
> (a*b) <u b --> llvm.umul.with.overflow.
> a >u (a*b) --> llvm.umul.with.overflow.
> b >u (a*b) --> llvm.umul.with.overflow.
>
> This resolves a README entry and technically resolves PR4917.
>
> <0001-InstCombine-Recognize-an-unsigned-mul-with-overflow-.patch>
The patch looks good to me. I'm just a bit nervous about feeding the backend umul.with.overflow with arbitrary integer types. Can you do some testing, esp. with strange types on a range of backends (e.g. ARM, PPC, …) so we don't get crash regressions there?
- Ben
More information about the llvm-commits
mailing list