Displaying 4 results from an estimated 4 matches for "tobool2".
Did you mean:
tobool
2016 Jul 27
2
Remove zext-unfolding from InstCombine
.... 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 it will not be possible to remove one of them via `transformZExtICmp()` to get to...
2017 Mar 31
2
Dereferenceable load semantics & LICM
...nt.group.
The motivation example is devirtualization:
struct A {
virtual void foo();
};
int bar();
void indirect(A &a) {
while(bar())
a.foo();
}
With -O2 -fstrict-vtable-pointers we get:
define void @hoist(%struct.A* dereferenceable(8)) {
entry:
%call1 = tail call i32 @bar()
%tobool2 = icmp eq i32 %call1, 0
br i1 %tobool2, label %while.end, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%b = bitcast %struct.A* %0 to void (%struct.A*)***
br label %while.body
while.body: ; preds = %
while.b...
2016 Aug 04
2
Remove zext-unfolding from InstCombine
...define i8 @foo(i8 %a, i8 %b) {
%and = and i8 %a, 1
%xor = xor i8 %and, 1
%cmp = icmp eq i8 %b, 0
%zext = zext i1 %cmp to i8
%or = or i8 %xor, %zext
ret i8 %or
}
… and also on ...
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
}
… InstCombine will now eventually get to:
define i8 @zext_or_icmp_icmp(i8 %a, i8 %b) {
%1 = icmp ne i8 %b, 0
%2 = zext i1 %1 to i8
%zext.demorgan = and i8 %2, %a
%zext = xor i8 %ze...
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