search for: zext_or_icmp_icmp

Displaying 3 results from an estimated 3 matches for "zext_or_icmp_icmp".

2016 Aug 04
2
Remove zext-unfolding from InstCombine
...Am 02.08.2016 um 21:39 schrieb Sanjay Patel <spatel at rotateright.com>: > > Hi Matthias - > > Sorry for the delayed reply. I think you're on the right path with D22864. No problem, thank you for your answer! > If I'm understanding it correctly, my foo() example and zext_or_icmp_icmp() will be equivalent after your patch is added to InstCombine. Yes, that’s correct. > If that's right, then you will be able to add a pattern match in matchDeMorgansLaws() for that exact sequence of instructions where we only have one icmp that is zexted. As you noted, we can't add the...
2016 Jul 27
2
Remove zext-unfolding from InstCombine
...()`, which is the reason why in the end we will only have one of the `icmp` instructions left. However, that means that `foo` will not be lowered to the IR that we have in zext-or-icmp.ll, where the `zext` is placed after the `or` instruction as opposed to `@foo_before_InstCombine`: ``` define i8 @zext_or_icmp_icmp(i8 %a, i8 %b) { %mask = and i8 %a, 1 %toBool1 = icmp eq i8 %mask, 0 %toBool2 = icmp eq i8 %b, 0 %bothCond = or i1 %toBool1, %toBool2 %zext = zext i1 %bothCond to i8 ret i8 %zext } ``` That means as long as the `zext` in zext-or-icmp.ll isn't pushed in front of the `icmp` operations...
2016 Jul 21
2
Remove zext-unfolding from InstCombine
Hi all, I have a question regarding a transformation that is carried out in InstCombine, which has been introduced by r48715. It unfolds expressions of the form `zext(or(icmp, (icmp)))` to `or(zext(icmp), zext(icmp)))` to expose pairs of `zext(icmp)`. In a subsequent iteration these `zext(icmp)` pairs could then (possibly) be optimized by another optimization (which has already been there before