[PATCH] D152778: [LoongArch] Ignore warnings when there is no environment in triple
Lu Weining via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 22:24:22 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG06cdc6f9ced3: [LoongArch] Ignore warnings when there is no environment in triple (authored by hev, committed by SixWeining).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152778/new/
https://reviews.llvm.org/D152778
Files:
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp
llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
Index: llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
===================================================================
--- llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
+++ llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
@@ -16,6 +16,13 @@
; CONFLICT-ILP32D: warning: triple-implied ABI conflicts with provided target-abi 'ilp32d', using target-abi
; CONFLICT-LP64D: warning: triple-implied ABI conflicts with provided target-abi 'lp64d', using target-abi
+;; Check that no warning is reported when there is no environment component in
+;; triple-supplied ABI modifiers and --target-abi is used.
+; RUN: llc --mtriple=loongarch64-linux --target-abi=lp64d --mattr=+d < %s 2>&1 \
+; RUN: | FileCheck %s --check-prefixes=LP64D,NO-WARNING
+
+; NO-WARNING-NOT: warning: triple-implied ABI conflicts with provided target-abi 'lp64d', using target-abi
+
;; Check that ILP32-on-LA64 and LP64-on-LA32 combinations are handled properly.
; RUN: llc --mtriple=loongarch64 --target-abi=ilp32d --mattr=+d < %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=LP64D,32ON64
Index: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp
===================================================================
--- llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp
+++ llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp
@@ -73,7 +73,7 @@
break;
}
- if (!ABIName.empty() && ArgProvidedABI != TripleABI)
+ if (!ABIName.empty() && TT.hasEnvironment() && ArgProvidedABI != TripleABI)
errs() << "warning: triple-implied ABI conflicts with provided target-abi '"
<< ABIName << "', using target-abi\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152778.531171.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/a4ad5510/attachment.bin>
More information about the llvm-commits
mailing list