[PATCH] D86301: [Verifier] Additional check for get.active.lane.mask
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 01:07:29 PDT 2020
samparker added inline comments.
================
Comment at: llvm/test/Verifier/get-active-lane-mask.ll:36
+
+define <4 x i1> @t5(i32 %IV) {
+; CHECK-NOT: get_active_lane_mask
----------------
SjoerdMeijer wrote:
> samparker wrote:
> > SjoerdMeijer wrote:
> > > samparker wrote:
> > > > I'm not familiar with verifying tests.. but why isn't this checking for the same result as the zero input case?
> > > because we're checking `%TC > 0` here, so 0 should throw a verifier message, and all the other values should be accepted.
> > So.... shouldn't -1 also throw the same error?
> Ah, sorry, this comment is just about the -1 case, I didn't read properly and thought it was about the 1 and -1 cases.
>
> The -1 is interpreted as an unsigned value (so is a big positive number). I think that's what we want because the semantics of the intrinsics is an `icmp ult`.
Okay, seems a little counter-intuitive after reading the assertion code, it looks like we could just check against a zero value instead of doing zext(TC) > 0.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86301/new/
https://reviews.llvm.org/D86301
More information about the llvm-commits
mailing list