[PATCH] CodeGen: Minor cleanup/simplification in CGStmt

Justin Bogner mail at justinbogner.com
Sun Nov 3 22:22:38 PST 2013


Rafael EspĂ­ndola <rafael.espindola at gmail.com> writes:
>> That seems like a good idea, but I need some input on where such a test
>> would go and how to structure it. I don't really see any similar tests.
>> From what I can see, EmitBranchOnBoolExpr is basically doing some
>> trivial constant folding so that our codegen at -O0 is reasonable.
>
> If you can get a C testcase it should probably go in clang/test/CodeGen.

What do you think of something like this? I'm not entirely convinced
this is a very good test, but it's hard to write "avoid extraneous basic
blocks" in test form. The best I could think of was avoiding unnecessary
phis.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-CodeGen-Test-that-simple-expressions-are-simplified-.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131103/e08f479f/attachment.bin>


More information about the cfe-commits mailing list