| # RUN: llc -mtriple=x86_64 -run-pass=none -o - %s | FileCheck %s | |
| # A register operand marked foldable (from an "rm" constraint) may be folded | |
| # to a stack slot by the register allocator. Check that the marker survives a | |
| # print/parse round trip, whether it was written symbolically (with or without | |
| # a register class) or as part of a numeric flag, and that a tied use, whose | |
| # matched operand number shares the marker's bits, never prints it. | |
| --- | |
| name: foldable | |
| tracksRegLiveness: true | |
| body: | | |
| bb.0: | |
| liveins: $rdi, $rsi, $edx | |
| ; CHECK-LABEL: name: foldable | |
| ; CHECK: INLINEASM &"", attdialect, regdef:GR64 foldable, def %3, regdef-ec:GR64 foldable, def early-clobber %4, regdef:GR64, def %5, regdef foldable, def %6, reguse:GR64 foldable, %0, reguse:GR32 foldable, %2, reguse foldable, %0, reguse tiedto:$0, %1(tied-def 3) | |
| %0:gr64 = COPY $rdi | |
| %1:gr64 = COPY $rsi | |
| %2:gr32 = COPY $edx | |
| INLINEASM &"", attdialect, regdef:GR64 foldable, def %3:gr64, regdef-ec:GR64 foldable, def early-clobber %4:gr64, regdef:GR64, def %5:gr64, regdef foldable, def %6:gr64, reguse:GR64 foldable, %0, 1076101129 /* reguse:GR32 foldable */, %2, reguse foldable, %0, reguse tiedto:$0, %1(tied-def 3) | |
| RET64 | |
| ... |