OSDN Git Service

In order to correctly compile
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 24 Jul 2012 21:40:17 +0000 (21:40 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 24 Jul 2012 21:40:17 +0000 (21:40 +0000)
commitcde227bc2a52c6e05c083df47eb08a01a94a09b1
tree2b5f4d8c39d09dde0e161121b557fe8d636be38b
parent16b7dd64e91f1b05b40ebfeb64b49f3ac17cb426
In order to correctly compile

struct s {
  double x1;
  float x2;
};
__attribute__((regparm(3))) struct s f(int a, int b, int c);
void g(void) {
  f(41, 42, 43);
}

We need to be able to represent passing the address of s to f (sret) in a
register (inreg). Turns out that all that is needed is to not mark them as
mutually incompatible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160695 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Attributes.h
test/CodeGen/X86/inreg.ll [new file with mode: 0644]