[PATCH] getMangledTypeStr: clarify how it mangles types, and add tests

Philip Reames listmail at philipreames.com
Mon Jan 12 16:24:09 PST 2015


================
Comment at: test/CodeGen/Generic/overloaded-intrinsic-name.ll:1
@@ +1,2 @@
+; RUN: llc < %s
+; Tests the name mangling performed by the codepath following
----------------
artagnon wrote:
> reames wrote:
> > 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.  
> `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.
I have to admit, I didn't look at the nearby tests.  If they had a particular style for testing the same thing, feel free to keep that.

================
Comment at: test/CodeGen/Generic/overloaded-intrinsic-name.ll:7
@@ +6,3 @@
+; function and integer
+define i32* @test_iAny(i32* %v) {
+       %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %v)
----------------
artagnon wrote:
> reames wrote:
> > Given that these don't have check statements, how do you judge correctness of the tests?
> 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.
Fine.  Add a comment to that effect please? Top of the file is fine.

http://reviews.llvm.org/D6915

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list