[PATCH] D32868: [globalisel][tablegen] Fix nullptr dereferences when getVRegDef() is called on a phys reg.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 14:45:52 PDT 2017


qcolombet added a comment.

Hi Daniel,

I have trouble to relate the description of the patch and the patch itself.
I was expecting something that would generate some guard before getVRegDef and instead I see that we take the address instead of a reference to an instruction.
I am guessing this is because we want the code used to emit the matcher to work with either non-null or null instruction, but I fail to see this demonstrated in the patch. In other words, I don't see where we would have a nullptr dereferenced here.

Put differently, where does the getVRegDef come into play in that patch?

Cheers,
-Quentin


https://reviews.llvm.org/D32868





More information about the llvm-commits mailing list