Skip to content

Commit 67b740b

Browse files
authored
[X86] Add diagnostic for fp128 inline assemble for 32-bit (#146458)
Suggested by Craig from #146259
1 parent e94c609 commit 67b740b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61737,6 +61737,9 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
6173761737
return std::make_pair(0U, &X86::VR128XRegClass);
6173861738
return std::make_pair(0U, &X86::VR128RegClass);
6173961739
case MVT::f128:
61740+
if (!Subtarget.is64Bit())
61741+
break;
61742+
[[fallthrough]];
6174061743
case MVT::v16i8:
6174161744
case MVT::v8i16:
6174261745
case MVT::v4i32:

llvm/test/CodeGen/X86/pr43157.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1+
; RUN: not llc < %s -mtriple=i686-pc-linux -o - -mattr=+sse2 2>&1 | FileCheck %s --check-prefix=ERR
22
; RUN: llc < %s -mtriple=x86_64-pc-linux -o - -mattr=+mmx | FileCheck %s
33

4+
; ERR: error: couldn't allocate input reg for constraint 'x'
45
define void @foo(fp128 %x) {
56
; CHECK-LABEL: foo:
67
; CHECK: # %bb.0: # %entry

0 commit comments

Comments
 (0)