https://github.com/eddyz87 requested changes to this pull request.

The change itself looks good to me, however it is a breaking change, e.g.:

```
$ cat test.c
struct foo { long a; long b; };
struct foo bar(int a, int b) { return (struct foo){a, b}; }
{llvm} [~/tmp]
$ clang -mcpu=v3 -O2 --target=bpf -c -o test.o test.c && disasm test.o

test.o: file format elf64-bpf

Disassembly of section .text:

0000000000000000 <bar>:
; bar():
       0:       w0 = w1
       1:       r0 <<= 0x20
       2:       r0 s>>= 0x20
       3:       w2 = w2
       4:       r2 <<= 0x20
       5:       r2 s>>= 0x20
       6:       exit
{llvm} [~/tmp]
$ clang -mcpu=v4 -O2 --target=bpf -c -o test.o test.c && disasm test.o

test.o: file format elf64-bpf

Disassembly of section .text:

0000000000000000 <bar>:
; bar():
       0:       w1 = w1
       1:       r0 = (s32)r1
       2:       w1 = w2
       3:       r2 = (s32)r1
       4:       exit
```

Should it be gated behind at-least cpuv4? (It appears that we don't want to add 
v5, do we?).

https://github.com/llvm/llvm-project/pull/206876
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to