[PATCH] D40146: [JumpThreading] Preservation of DT and LVI across the pass
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 17:18:49 PST 2018
rnk added a comment.
CReduce got this reduction, but I think you can go further:
struct a {
int b;
};
class c {
public:
c(bool) : d() {}
~c() {}
bool e() { return d; }
bool d;
};
class f : a {
c g();
c h();
c i();
};
enum { j };
c f::h() {
switch (b)
case j: {
auto a(i());
if (a.e())
return a;
}
return 0;
}
c f::i() {
{
auto b(g());
if (b.e())
return b;
}
return 0;
}
Use the command line `clang -cc1 idl_parser.cpp -S -emit-llvm -O2 -o t.ll`.
Repository:
rL LLVM
https://reviews.llvm.org/D40146
More information about the llvm-commits
mailing list