aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2024-06-17 17:57:07 +0100
committerGitHub <noreply@github.com>2024-06-17 17:57:07 +0100
commitd1a4f0c9fb559eb4c2fb56112e56343bcd333edc (patch)
tree9e4fabe1dfd9edfc0c4a2a9dea8cbf59e15b5120 /llvm/lib/CodeGen
parent5914a5671a1596f68189c8408f8d877e6b6373bf (diff)
downloadllvm-d1a4f0c9fb559eb4c2fb56112e56343bcd333edc.zip
llvm-d1a4f0c9fb559eb4c2fb56112e56343bcd333edc.tar.gz
llvm-d1a4f0c9fb559eb4c2fb56112e56343bcd333edc.tar.bz2
[AArch64] Lower extending sitofp using tbl (#92528)
In a similar manner as in https://reviews.llvm.org/D133494 use `TBL` to place bytes in the *upper* part of `i32` elements and then convert to float using fixed-point `scvtf`, i.e. scvtf Vd.4s, Vn.4s, #24
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index bb2c76d..aee9935 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -8331,7 +8331,8 @@ bool CodeGenPrepare::optimizeInst(Instruction *I, ModifyDT &ModifiedDT) {
if (OptimizeNoopCopyExpression(CI, *TLI, *DL))
return true;
- if ((isa<UIToFPInst>(I) || isa<FPToUIInst>(I) || isa<TruncInst>(I)) &&
+ if ((isa<UIToFPInst>(I) || isa<SIToFPInst>(I) || isa<FPToUIInst>(I) ||
+ isa<TruncInst>(I)) &&
TLI->optimizeExtendOrTruncateConversion(
I, LI->getLoopFor(I->getParent()), *TTI))
return true;