[llvm] 77c43e1 - [X86][FastISel] X86SelectIntToFP - don't assume value type is simple.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 03:05:30 PDT 2023
Author: Simon Pilgrim
Date: 2023-10-03T11:05:14+01:00
New Revision: 77c43e14897a404fbf4a132a1a75d49ba2ec08c1
URL: https://github.com/llvm/llvm-project/commit/77c43e14897a404fbf4a132a1a75d49ba2ec08c1
DIFF: https://github.com/llvm/llvm-project/commit/77c43e14897a404fbf4a132a1a75d49ba2ec08c1.diff
LOG: [X86][FastISel] X86SelectIntToFP - don't assume value type is simple.
Fixes #68068
Added:
llvm/test/CodeGen/X86/pr68068.ll
Modified:
llvm/lib/Target/X86/X86FastISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index f60b7e74ce6e811..6dc8cd4b2b3e92a 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -2391,7 +2391,7 @@ bool X86FastISel::X86SelectIntToFP(const Instruction *I, bool IsSigned) {
return false;
// TODO: We could sign extend narrower types.
- MVT SrcVT = TLI.getSimpleValueType(DL, I->getOperand(0)->getType());
+ EVT SrcVT = TLI.getValueType(DL, I->getOperand(0)->getType());
if (SrcVT != MVT::i32 && SrcVT != MVT::i64)
return false;
diff --git a/llvm/test/CodeGen/X86/pr68068.ll b/llvm/test/CodeGen/X86/pr68068.ll
new file mode 100644
index 000000000000000..774b3e311f18e3a
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr68068.ll
@@ -0,0 +1,11 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-- -fast-isel=1 | FileCheck %s
+
+define float @f() "target-features"="+avx512f" {
+; CHECK-LABEL: f:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vxorps %xmm0, %xmm0, %xmm0
+; CHECK-NEXT: retq
+ %1 = uitofp i15 poison to float
+ ret float %1
+}
More information about the llvm-commits
mailing list