blob: 45c387f05ce2052da5a98bcb423c776d789ddf9f [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.
Eric Christopherf5d99772015-02-06 20:53:40 +000011// CHECK: call i64 asm sideeffect "mfcr $0", "=&{r0},{r0}"