[llvm] [X86] combineSelect - don't check SimpleValueTypes through bitcast (PR #230040)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 02:32:31 PDT 2026
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/230040
Although unlikely, its always possible that there's a weird type behind the cast
Noticed by inspection
>From 9f9c3ae85140e02e6ec8c507d1761230095a0546 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Thu, 8 Oct 2026 10:31:30 +0100
Subject: [PATCH] [X86] combineSelect - don't check SimpleValueTypes through
bitcast
Although unlikely, its always possible that there's a weird type behind the cast
Noticed by inspection
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a305d1c4f8fdd..85280bcd1bb4e 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -49006,9 +49006,9 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
}
} else if (VT == MVT::i16 && LHS.getOpcode() == ISD::BITCAST &&
RHS.getOpcode() == ISD::BITCAST) {
- MVT SVT = LHS.getOperand(0).getSimpleValueType();
+ EVT SVT = LHS.getOperand(0).getValueType();
if ((SVT == MVT::f16 || SVT == MVT::bf16) &&
- SVT == RHS.getOperand(0).getSimpleValueType()) {
+ SVT == RHS.getOperand(0).getValueType()) {
F16LHS = DAG.getBitcast(MVT::f16, LHS.getOperand(0));
F16RHS = DAG.getBitcast(MVT::f16, RHS.getOperand(0));
}
More information about the llvm-commits
mailing list