blob: 7d073b17b70fa92b8796aa3f7d24aab2365082bf [file] [log] [blame]
Eric Christopher79f5e4e2015-02-06 18:44:18 +00001// 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.
4void 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.
11// CHECK: call i64 asm sideeffect "mfcr $0", "=&{r0},{r0}"(i64 %0)