[llvm] [X86] LowerAsmOperandForConstraint - ensure we treat L constraint immediates as signed constants (PR #171098)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 06:19:14 PST 2025
================
@@ -0,0 +1,15 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
+
+ at out = global i32 0, align 4
+define void @bar() {
+; CHECK-LABEL: bar:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq out at GOTPCREL(%rip), %rax
+; CHECK-NEXT: #APP
+; CHECK-NEXT: addq $-1, (%rax)
+; CHECK-NEXT: #NO_APP
+; CHECK-NEXT: retq
+ call void asm "addq $1,$0", "=*m,L,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) @out, i32 -1)
----------------
phoebewang wrote:
Does `elementtype(i32)` matter here?
https://github.com/llvm/llvm-project/pull/171098
More information about the llvm-commits
mailing list