llvm-project/clang/test/CodeGen/inline-asm-matching-constraint.c
Eric Christopher f5d9977600 Make this test a little less specific by removing the argument that
could change.

llvm-svn: 228438
2015-02-06 20:53:40 +00:00

12 lines
495 B
C

// RUN: %clang_cc1 -emit-llvm %s -o - -triple powerpc64le-linux-gnu | FileCheck %s
// Sadly since this requires a register constraint to trigger we have to set
// a target here.
void a(void) {
register unsigned long __sc_0 __asm__("r0");
__asm__ __volatile__("mfcr %0" : "=&r"(__sc_0) : "0"(__sc_0));
}
// Check that we can generate code for this correctly. The matching input
// constraint should not have an early clobber on it.
// CHECK: call i64 asm sideeffect "mfcr $0", "=&{r0},{r0}"