[clang] Do not attempt to zero-extend _BitInt(1) when not required
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Tue, 2 May 2023 12:20:29 +0000 (08:20 -0400)
committerMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Tue, 2 May 2023 12:23:22 +0000 (08:23 -0400)
commit7133283835fbc260465e899ff86c07202486558a
tree54bde4bbeb6f697974de1edec375e8c8090b7e2c
parent1d0ccebcd725309399262af346494242b064e2ed
[clang] Do not attempt to zero-extend _BitInt(1) when not required

`ConvertTypeForMem` doesn't return wider type for _BitInt unless it is
used in a bitfield, so no need to extend when trying to initialize a
global variable.

Fixes https://github.com/llvm/llvm-project/issues/62207

Reviewed By: erichkeane, shafik

Differential Revision: https://reviews.llvm.org/D149436
clang/docs/ReleaseNotes.rst
clang/lib/CodeGen/CGExprConstant.cpp
clang/test/CodeGen/ext-int.c