[llvm] [PowerPC] Correct the SDTypeProfile for VECSHL and FP_EXTEND_HALF. (PR #228341)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 00:33:41 PDT 2026


https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/228341

>From 95688aab0610249abbd808e6856667e08f9bf6ce Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 1 Oct 2026 23:26:59 -0700
Subject: [PATCH] [PowerPC] Correct the SDTypeProfile for VECSHL and
 FP_EXTEND_HALF.

These use SDTCisPtrTy, but the operand is always created with i32
type.
---
 llvm/lib/Target/PowerPC/PPCInstrInfo.td | 2 +-
 llvm/lib/Target/PowerPC/PPCInstrVSX.td  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index 59d33f8ee21db..cc1b9972ef13a 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -55,7 +55,7 @@ def SDT_PPCSpToDp : SDTypeProfile<1, 1, [ SDTCisVT<0, v2f64>,
 ]>;
 
 def SDT_PPCVecShift : SDTypeProfile<1, 3, [ SDTCisVec<0>,
-  SDTCisVec<1>, SDTCisVec<2>, SDTCisPtrTy<3>
+  SDTCisVec<1>, SDTCisVec<2>, SDTCisVT<3, i32>
 ]>;
 
 def SDT_PPCVecShiftQuad : SDTypeProfile<1, 2, [
diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
index 4171ff46baddd..8961f0bb8ca96 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
@@ -56,7 +56,7 @@ def SDT_PPCldvsxlh : SDTypeProfile<1, 1, [
 ]>;
 
 def SDT_PPCfpexth : SDTypeProfile<1, 2, [
-  SDTCisVT<0, v2f64>, SDTCisVT<1, v4f32>, SDTCisPtrTy<2>
+  SDTCisVT<0, v2f64>, SDTCisVT<1, v4f32>, SDTCisVT<2, i32>
 ]>;
 
 def SDT_PPCldsplat : SDTypeProfile<1, 1, [



More information about the llvm-commits mailing list