@@ -5336,6 +5336,7 @@ X86:
operand in a SSE register. If AVX is also enabled, can also be a 256-bit
vector operand in an AVX register. If AVX-512 is also enabled, can also be a
512-bit vector operand in an AVX512 register. Otherwise, an error.
+- ``Ws``: A symbolic
@@ -56966,6 +56965,17 @@ void
X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
}
return;
}
+ case 'W': {
+assert(Constraint[1] == 's');
+if (const auto *GA = dyn_cast(Op)) {
+ Ops.push_back(DAG.getTargetGlobalAddress(GA->getGlobal(),
@@ -0,0 +1,34 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=i686 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64 < %s | FileCheck %s
+
+@var = external dso_local global i32, align 4
+
+define dso_local void @test() {
+;
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Fangrui Song (MaskRay)
Changes
Printing the raw symbol is useful in inline asm (e.g. getting the C++
mangled name, referencing a symbol in a custom way while ensuring it is
not optimized out even if internal). Similar constraints are
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
@llvm/pr-subscribers-llvm-ir
Author: Fangrui Song (MaskRay)
Changes
Printing the raw symbol is useful in inline asm (e.g. getting the C++
mangled name, referencing a symbol in a custom way while ensuring it is
not optimized out even if
https://github.com/MaskRay created
https://github.com/llvm/llvm-project/pull/77886
Printing the raw symbol is useful in inline asm (e.g. getting the C++
mangled name, referencing a symbol in a custom way while ensuring it is
not optimized out even if internal). Similar constraints are available