aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2022-01-13 15:59:03 +0000
committerDavid Sherwood <david.sherwood@arm.com>2022-01-13 15:59:43 +0000
commitba471ba8d2a37617684e0bd87fe15b583f7e7de0 (patch)
treee75865f9caa8aabb775bec1a6ddff8a6c73bcb1a /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentfe17ce0fa6626f79be663ab9948c1ed24d8e2b85 (diff)
downloadllvm-ba471ba8d2a37617684e0bd87fe15b583f7e7de0.zip
llvm-ba471ba8d2a37617684e0bd87fe15b583f7e7de0.tar.gz
llvm-ba471ba8d2a37617684e0bd87fe15b583f7e7de0.tar.bz2
Revert "[CodeGen][AArch64] Ensure isSExtCheaperThanZExt returns true for negative constants"
This reverts commit 31009f0b5afb504fc1f30769c038e1b7be6ea45b. It seems to be causing SVE VLA buildbot failures and has introduced a genuine regression. Reverting for now.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 8053f1d..747f4e4 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -7004,7 +7004,7 @@ bool CodeGenPrepare::optimizeSwitchInst(SwitchInst *SI) {
// matching the argument extension instead.
Instruction::CastOps ExtType = Instruction::ZExt;
// Some targets prefer SExt over ZExt.
- if (TLI->isSExtCheaperThanZExt(OldVT, RegType, SDValue()))
+ if (TLI->isSExtCheaperThanZExt(OldVT, RegType))
ExtType = Instruction::SExt;
if (auto *Arg = dyn_cast<Argument>(Cond)) {