[llvm] [TargetLowering] Deduplicate choosing InlineAsm constraint between ISels (PR #67057)
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 08:38:56 PDT 2023
================
@@ -5879,7 +5878,19 @@ void TargetLowering::ComputeConstraintToUse(AsmOperandInfo &OpInfo,
OpInfo.ConstraintCode = OpInfo.Codes[0];
OpInfo.ConstraintType = getConstraintType(OpInfo.ConstraintCode);
} else {
- ChooseConstraint(OpInfo, *this, Op, DAG);
+ ConstraintGroup G = getConstraintPreferences(OpInfo);
+ if (G.empty())
+ return;
+
+ unsigned BestIdx = 0;
+ while (!lowerImmediateIfPossible(G[BestIdx], Op, DAG, *this)) {
----------------
nickdesaulniers wrote:
https://github.com/llvm/llvm-project/pull/67057/commits/a0cb4cb60f3ee83876929a152ed0a11abe34fe6c
https://github.com/llvm/llvm-project/pull/67057
More information about the llvm-commits
mailing list