You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached program crashes in the inliner when wasm exception handling is enabled.
It was reduced with creduce, but I haven't attempted to reduce it manually yet.
classa;
classb {
public:
a *operator->();
};
classc {
voidm_fn1();
voide();
};
classf {
public:voidg();
};
classa {
public:inth() { am.g(); return0;}
f am;
};
voidc::e() {
c *ao;
bool ap = false;
try {
m_fn1();
try {
b d;
int aq = d->h();
if (aq)
ap = true;
m_fn1();
} catch (int) {
}
} catch (...) {
if (ap)
ao = 0;
}
}
As discussed offline: there's a workaround for the build that this test was derived from, which reduces the urgency. But it's not a great workaround (it's to disable opaque pointers), and it could stop working, so we shouldn't just let this drop for too long.
If an integer PHI has an illegal type (according to the data layout) and
it is only used by `trunc` or `trunc(lshr)` operations, we split the PHI
into various instructions in its predecessors:
https://github.com/llvm/llvm-project/blob/6d1543a16797fa07eecea7e542df5b42422fc721/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp#L1536-L1543
So this can produce code like the following:
Before:
```
pred:
...
bb:
%p = phi i8 [ %somevalue, %pred ], ...
...
%tobool = trunc i8 %p to i1
use %tobool
...
```
In this code, `%p` has an illegal integer type, `i8`, and its only used
in a `trunc` instruction later. In this case this pass puts extraction
code in its predecessors:
After:
```
pred:
...
%t = and i8 %somevalue, 1
%extract = icmp ne i8 %t, 0
bb:
%p.new = phi i1 [ %extract, %pred ], ...
use %p.new instead of %tobool
```
But this doesn't work if `pred` is a `catchswitch` BB because it cannot
have any non-PHI instructions. This CL ensures we bail out in that case.
Fixesllvm/llvm-project#55803.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D127699
The attached program crashes in the inliner when wasm exception handling is enabled.
It was reduced with creduce, but I haven't attempted to reduce it manually yet.
command:
It gives the following assertion failure:
The text was updated successfully, but these errors were encountered: