aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-11-03 10:46:07 +0100
committerGitHub <noreply@github.com>2023-11-03 10:46:07 +0100
commite4a4122eb6768b69640173b4c32fd88de4547227 (patch)
treee0c6343e6a4f10225168345da68dc93877a78e16 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parente9db60c05e2fb96ff40cbb1f78790abc5de9237e (diff)
downloadllvm-e4a4122eb6768b69640173b4c32fd88de4547227.zip
llvm-e4a4122eb6768b69640173b4c32fd88de4547227.tar.gz
llvm-e4a4122eb6768b69640173b4c32fd88de4547227.tar.bz2
[IR] Remove zext and sext constant expressions (#71040)
Remove support for zext and sext constant expressions. All places creating them have been removed beforehand, so this just removes the APIs and uses of these constant expressions in tests. There is some additional cleanup that can be done on top of this, e.g. we can remove the ZExtInst vs ZExtOperator footgun. This is part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 747968b..1c92da5a 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1394,6 +1394,9 @@ static bool isConstExprSupported(const BitcodeConstant *BC) {
if (Instruction::isBinaryOp(Opcode))
return ConstantExpr::isSupportedBinOp(Opcode);
+ if (Instruction::isCast(Opcode))
+ return ConstantExpr::isSupportedCastOp(Opcode);
+
if (Opcode == Instruction::GetElementPtr)
return ConstantExpr::isSupportedGetElementPtr(BC->SrcElemTy);