[PATCH] D34538: Handle ConstantExpr correctly in SelectionDAGBuilder

Benoit Vey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 16:13:34 PDT 2017


Praetonus added a comment.

@efriedma Sorry for the test case, I did write one based on the reduced case from the PR, I'm not sure why SVN didn't include it in the diff. Anyway, I'll update to include it.

I'm not sure how `SelectionDAGBuilder::visit` could be fixed. It seems to me that instruction opcodes are shared by both the constant and non-constant version of an instruction, so the function wouldn't be able to handle a constant and a non-constant instruction separately unless it uses `isa` or a similar mechanism. I could be missing something though since my knowledge of the LLVM code base is rather limited.


https://reviews.llvm.org/D34538





More information about the llvm-commits mailing list