@@ -47980,7 +47980,6 @@ X86TargetLowering::getConstraintType(StringRef Constraint) const {
47980
47980
case 'y':
47981
47981
case 'x':
47982
47982
case 'v':
47983
- case 'Y':
47984
47983
case 'l':
47985
47984
case 'k': // AVX512 masking registers.
47986
47985
return C_RegisterClass;
@@ -48073,13 +48072,10 @@ TargetLowering::ConstraintWeight
48073
48072
if (type->isX86_MMXTy() && Subtarget.hasMMX())
48074
48073
weight = CW_SpecificReg;
48075
48074
break;
48076
- case 'Y': {
48077
- unsigned Size = StringRef(constraint).size();
48078
- // Pick 'i' as the next char as 'Yi' and 'Y' are synonymous, when matching 'Y'
48079
- char NextChar = Size == 2 ? constraint[1] : 'i';
48080
- if (Size > 2)
48075
+ case 'Y':
48076
+ if (StringRef(constraint).size() != 2)
48081
48077
break;
48082
- switch (NextChar ) {
48078
+ switch (constraint[1] ) {
48083
48079
default:
48084
48080
return CW_Invalid;
48085
48081
// XMM0
@@ -48100,17 +48096,15 @@ TargetLowering::ConstraintWeight
48100
48096
if (type->isX86_MMXTy() && Subtarget.hasMMX())
48101
48097
return weight;
48102
48098
return CW_Invalid;
48103
- // Any SSE reg when ISA >= SSE2, same as 'Y '
48099
+ // Any SSE reg when ISA >= SSE2, same as 'x '
48104
48100
case 'i':
48105
48101
case 't':
48106
48102
case '2':
48107
48103
if (!Subtarget.hasSSE2())
48108
48104
return CW_Invalid;
48109
48105
break;
48110
48106
}
48111
- // Fall through (handle "Y" constraint).
48112
- LLVM_FALLTHROUGH;
48113
- }
48107
+ break;
48114
48108
case 'v':
48115
48109
if ((type->getPrimitiveSizeInBits() == 512) && Subtarget.hasAVX512())
48116
48110
weight = CW_Register;
@@ -48192,8 +48186,6 @@ LowerXConstraint(EVT ConstraintVT) const {
48192
48186
// FP X constraints get lowered to SSE1/2 registers if available, otherwise
48193
48187
// 'f' like normal targets.
48194
48188
if (ConstraintVT.isFloatingPoint()) {
48195
- if (Subtarget.hasSSE2())
48196
- return "Y";
48197
48189
if (Subtarget.hasSSE1())
48198
48190
return "x";
48199
48191
}
@@ -48492,9 +48484,6 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
48492
48484
case 'y': // MMX_REGS if MMX allowed.
48493
48485
if (!Subtarget.hasMMX()) break;
48494
48486
return std::make_pair(0U, &X86::VR64RegClass);
48495
- case 'Y': // SSE_REGS if SSE2 allowed
48496
- if (!Subtarget.hasSSE2()) break;
48497
- LLVM_FALLTHROUGH;
48498
48487
case 'v':
48499
48488
case 'x': // SSE_REGS if SSE1 allowed or AVX_REGS if AVX allowed
48500
48489
if (!Subtarget.hasSSE1()) break;
@@ -48557,7 +48546,7 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
48557
48546
case 'i':
48558
48547
case 't':
48559
48548
case '2':
48560
- return getRegForInlineAsmConstraint(TRI, "Y ", VT);
48549
+ return getRegForInlineAsmConstraint(TRI, "x ", VT);
48561
48550
case 'm':
48562
48551
if (!Subtarget.hasMMX()) break;
48563
48552
return std::make_pair(0U, &X86::VR64RegClass);
0 commit comments