Eric Christopher | 79f5e4e | 2015-02-06 18:44:18 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - -triple powerpc64le-linux-gnu | FileCheck %s |
| 2 | // Sadly since this requires a register constraint to trigger we have to set |
| 3 | // a target here. |
| 4 | void a(void) { |
| 5 | register unsigned long __sc_0 __asm__("r0"); |
| 6 | __asm__ __volatile__("mfcr %0" : "=&r"(__sc_0) : "0"(__sc_0)); |
| 7 | } |
| 8 | |
| 9 | // Check that we can generate code for this correctly. The matching input |
| 10 | // constraint should not have an early clobber on it. |
Eric Christopher | f5d9977 | 2015-02-06 20:53:40 +0000 | [diff] [blame] | 11 | // CHECK: call i64 asm sideeffect "mfcr $0", "=&{r0},{r0}" |