Write a set of tests that show how name mangling is done for overloaded intrinsics.
Details
Diff Detail
Event Timeline
After some investigation, I have concluded that this change is
completely incorrect. For integers, floats and vectors, it is supposed
to fall back to the getEVTString() which may then return "i", "v",
"f" prefixes in the common case.
I have instead focused on updating the comment with this information,
and writing a set of tests that people can use as a guide for coming
up with the correct mangling string.
Comments inline. I like the general direction of the revised patch.
lib/IR/Function.cpp | ||
---|---|---|
457–461 | Please separate line breaking differences into their own patch. It's hard to tell what actually changed in this comment. | |
466 | x88mmx isn't what actually appears in your test? Why the difference? (Clarify in comment please.) FYI - I expect you'll run into some problems actually lowering vectors gc.relocates. It's not a case we've explored. | |
test/CodeGen/Generic/overloaded-intrinsic-name.ll | ||
2 | This is probably better as an opt -verify test. Not sure CodeGen is the right place for it either. Alternatively, you could go the other direction and adapt this to be a gc lowering specific test. This would involve checking the assembly output, but might be reasonable tor exercising the vector path it seems like you're interested in. | |
5 | You might want to clarify that the use of gc.* is arbitrary and that these are no GC tests. It's mostly clear, but could be a bit more explicit. | |
8 | Given that these don't have check statements, how do you judge correctness of the tests? |
lib/IR/Function.cpp | ||
---|---|---|
466 | x86mmx is an x86-specific type that's actually a 64-bit vector. There are already tests specifically for mmx in the same directory; I just want to document common name manglings in one place. Yeah, I'll look into gc.relocate and vectors after this. | |
test/CodeGen/Generic/overloaded-intrinsic-name.ll | ||
2 | opt -verify -S it is then. Why not codegen? I can see plenty of similar code in the same directory. I'll add to statepoint-call-lowering in subsequent patches. | |
8 | We just want to ensure that it runs fine. Specifically checking name mangling against the types of arguments is not something I'm aiming for in this patch. |
Modify this comment to reflect that we handle vectors too.