[PATCH] D37775: Add a verifier test to check the access on both sides of COPY are the same

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 14:47:10 PST 2018


aditya_nandakumar added inline comments.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:985
+      assert(DstSize && "Expecting size here");
+      if (SrcSize != DstSize)
+        // Catch only obvious cases not involving subregs for now.
----------------
rtereshin wrote:
> What if neither of the registers has a class? That would mean, both registers have LLTs. Then, the check won't complain if those LLTs have the same size in bits, but don't exactly match, like `v2s32` and `v4s16`, for instance.
> 
> Shouldn't LLTs match exactly if both are valid?
Good catch. I should be checking LLTs are equal here. I will update the patch.


https://reviews.llvm.org/D37775





More information about the llvm-commits mailing list