llvm-project/llvm/test/CodeGen/X86/inline-asm-i-constraint-i1.ll
Fangrui Song 04a67528d3
[MC] Simplify MCBinaryExpr/MCUnaryExpr printing by reducing parentheses (#133674)
The existing pretty printer generates excessive parentheses for
MCBinaryExpr expressions. This update removes unnecessary parentheses
of MCBinaryExpr with +/- operators and MCUnaryExpr.
Since relocatable expressions only use + and -, this change improves
readability in most cases.

Examples:

- (SymA - SymB) + C now prints as SymA - SymB + C.
  This updates the output of -fexperimental-relative-c++-abi-vtables for
  AArch64 and x86 to `.long _ZN1B3fooEv@PLT-_ZTV1B-8`
- expr + (MCTargetExpr) now prints as expr + MCTargetExpr, with this
  change primarily affecting AMDGPUMCExpr.
2025-03-30 22:03:14 -07:00

16 lines
422 B
LLVM

; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
; Make sure that boolean immediates are properly (zero) extended.
; CHECK: .Ltmp[[N:[0-9]+]]:
; CHECK-NEXT: .quad 42+1-.Ltmp[[N]]
target triple = "x86_64-unknown-linux-gnu"
define i32 @foo() #0 {
entry:
tail call void asm sideeffect ".quad 42 + ${0:c} - .\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i1 true) #0
ret i32 1
}
attributes #0 = { nounwind }