[all-commits] [llvm/llvm-project] 255a99: [APInt] Fix APInt constructions where value does n...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Oct 16 23:48:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 255a99c29f9fa1a89b03a85a3a73d6f44d03c6c1
      https://github.com/llvm/llvm-project/commit/255a99c29f9fa1a89b03a85a3a73d6f44d03c6c1
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ByteCode/IntegralAP.h
    M clang/lib/CodeGen/CGVTT.cpp
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/Parse/ParseInit.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M lldb/source/Expression/DWARFExpression.cpp
    M llvm/include/llvm/ADT/APFixedPoint.h
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Analysis/Loads.cpp
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
    M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
    M llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp
    M llvm/lib/Target/Hexagon/HexagonGenExtract.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/unittests/ADT/APFixedPointTest.cpp

  Log Message:
  -----------
  [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (#80309)

This fixes all the places that hit the new assertion added in
https://github.com/llvm/llvm-project/pull/106524 in tests. That is,
cases where the value passed to the APInt constructor is not an N-bit
signed/unsigned integer, where N is the bit width and signedness is
determined by the isSigned flag.

The fixes either set the correct value for isSigned, set the
implicitTrunc flag, or perform more calculations inside APInt.

Note that the assertion is currently still disabled by default, so this
patch is mostly NFC.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list