[PATCH] D52441: [CodeGen] Update min-legal-vector width based on function argument and return types

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 11:27:29 PDT 2018


rnk added a comment.

Code looks fine, but attribute testing is always a pain.



================
Comment at: test/CodeGen/aarch64-neon-3v.c:14
 
-// CHECK-LABEL: define <16 x i8> @test_vandq_s8(<16 x i8> %a, <16 x i8> %b) #0 {
 // CHECK:   [[AND_I:%.*]] = and <16 x i8> %a, %b
----------------
These attribute changes don't appear to test anything. They don't say anything about the min-legal-vector-width. It's unfortunate that LLVM attribute syntax is so filecheck unfriendly, but for now, I think you need to check for #0, #1, etc attribute definitions at the end of each .c file.


================
Comment at: test/CodeGen/x86-vector-width.c:51
+
+// CHECK: foo{{.*}} #0
+// CHECK: goo{{.*}} #1
----------------
I'd look for `define {{.*}}@foo{{.*}} #0` to be a bit more precise.


================
Comment at: test/CodeGenOpenCL/fpmath.cl:52-53
+// CHECK: attributes #[[ATTR2]] = {
+// NODIVOPT: "correctly-rounded-divide-sqrt-fp-math"="false"
+// DIVOPT: "correctly-rounded-divide-sqrt-fp-math"="true"
+// CHECK: }
----------------
Does this actually work? Shouldn't these be `NODIVOPT-SAME: "correctly-rounded-divide-sqrt-fp-math"="false"`?


https://reviews.llvm.org/D52441





More information about the cfe-commits mailing list