llvm-project/llvm/lib/TableGen
Daniel Sanders f8ecb22dcb [tblgen] Fix undefined behaviour when assigning integers to large bits<n>'s
This code:
  bits<96> X = 0;
was triggering undefined behaviour since it iterates over bits 0..95 and tests
them against the IntInit using 1LL << I.

This patch resolves the undefined behaviour by continuing to treat the IntInit
as a 64-bit value and simply causing all bit tests in excess of 64-bits to report
false. As a result,
  bits<96> X = -1;
will be equivalent to:
  bits<96> X;
  let X{0-63} = -1;
  let X{64-95} = 0;

llvm-svn: 342744
2018-09-21 16:32:49 +00:00
..
CMakeLists.txt [TableGen] Add a general-purpose JSON backend. 2018-07-11 08:40:19 +00:00
Error.cpp [TableGen] Use WithColor for printing errors/warnings 2018-06-23 16:48:03 +00:00
JSONBackend.cpp [TableGen] Add missing std::moves to fix build failure. 2018-07-11 08:57:56 +00:00
LLVMBuild.txt
Main.cpp Revert r330742: Let TableGen write output only if it changed, instead of doing so in cmake. 2018-05-07 23:41:48 +00:00
Record.cpp [tblgen] Fix undefined behaviour when assigning integers to large bits<n>'s 2018-09-21 16:32:49 +00:00
SetTheory.cpp [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
StringMatcher.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
TGLexer.cpp TableGen: Add !ne, !le, !lt, !ge, and !gt comparisons 2018-03-14 11:00:57 +00:00
TGLexer.h TableGen: Add !ne, !le, !lt, !ge, and !gt comparisons 2018-03-14 11:00:57 +00:00
TGParser.cpp TableGen: Allow foreach in multiclass to depend on template args 2018-06-21 13:35:44 +00:00
TGParser.h TableGen: Allow foreach in multiclass to depend on template args 2018-06-21 13:35:44 +00:00
TableGenBackend.cpp