[llvm] 1ebbf84 - [NFC][IR] PHINode: assert we aren't trying to create token-typed PHI

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 11:26:41 PDT 2021


Already fixed, thanks.

On Tue, Apr 27, 2021 at 9:24 PM Jay Foad <jay.foad at gmail.com> wrote:
>
> I think this is causing a test failure in my release+asserts build:
>
> [3461/3462] Running lit suite /home/jayfoad2/git/llvm-project/llvm/test/Verifier
> FAIL: LLVM :: Verifier/token1.ll (248 of 249)
> ******************** TEST 'LLVM :: Verifier/token1.ll' FAILED
> ********************
> Script:
> --
> : 'RUN: at line 1';   not /home/jayfoad2/llvm-release/bin/llvm-as
> /home/jayfoad2/git/llvm-project/llvm/test/Verifier/token1.ll -o
> /dev/null 2>&1 | /home/jayfoad2/llvm-release/bin/FileCheck
> /home/jayfoad2/git/llvm-project/llvm/test/Verifier/token1.ll
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> + : 'RUN: at line 1'
> + not /home/jayfoad2/llvm-release/bin/llvm-as
> /home/jayfoad2/git/llvm-project/llvm/test/Verifier/token1.ll -o
> /dev/null
> + /home/jayfoad2/llvm-release/bin/FileCheck
> /home/jayfoad2/git/llvm-project/llvm/test/Verifier/token1.ll
>
> --
>
> ********************
> ********************
> Failed Tests (1):
>   LLVM :: Verifier/token1.ll
>
> Jay.
>
> On Tue, 27 Apr 2021 at 18:50, Roman Lebedev via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Roman Lebedev
> > Date: 2021-04-27T20:49:42+03:00
> > New Revision: 1ebbf84ba45b1af8b6469f79a6c6798d185bc1d2
> >
> > URL: https://github.com/llvm/llvm-project/commit/1ebbf84ba45b1af8b6469f79a6c6798d185bc1d2
> > DIFF: https://github.com/llvm/llvm-project/commit/1ebbf84ba45b1af8b6469f79a6c6798d185bc1d2.diff
> >
> > LOG: [NFC][IR] PHINode: assert we aren't trying to create token-typed PHI
> >
> > Verifier will complain, but by then it may be too late,
> > because we might have never reached it because
> > we already crashed with some bogus bug.
> > It is best to catch this the moment it happens.
> >
> > Added:
> >
> >
> > Modified:
> >     llvm/include/llvm/IR/Instructions.h
> >
> > Removed:
> >
> >
> >
> > ################################################################################
> > diff  --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
> > index 14ba509f424e7..650746c028383 100644
> > --- a/llvm/include/llvm/IR/Instructions.h
> > +++ b/llvm/include/llvm/IR/Instructions.h
> > @@ -2583,6 +2583,7 @@ class PHINode : public Instruction {
> >                     Instruction *InsertBefore = nullptr)
> >      : Instruction(Ty, Instruction::PHI, nullptr, 0, InsertBefore),
> >        ReservedSpace(NumReservedValues) {
> > +    assert(!Ty->isTokenTy() && "PHI nodes cannot have token type!");
> >      setName(NameStr);
> >      allocHungoffUses(ReservedSpace);
> >    }
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list