[PATCH] AVX intrinsics were broken on CPU with AVX-512 instruction set

Robert Khasanov rob.khasanov at gmail.com
Mon Jul 21 22:45:28 PDT 2014

Sorry I forget add context to the diff (-U999999).
The bug is that AVX intrinsics is not generated with -mcpu=knl (and other cpu with AVX512 ISA).
Running "llc < test/CodeGen/X86/avx-intrinsics-x86.ll -mtriple=x86_64-apple-darwin -march=x86 -mcpu=knl" you can see error: 
LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse2.add.sd

In this patch I just fix avx-intrinsics-x86.ll.
I found that the reason was incorrect predicates: they used UseAVX instead HasAVX, i changed this.
However, after this fix some codegen tests for AVX512 instructions fails. Reason is generating AVX instructions instead of AVX512 on AVX512 tests, this is due to equal complexity of AVX and AVX512 patterns. So to fix this I added for AVX512 instructions patterns more complexity.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4605.11740.patch
Type: text/x-patch
Size: 6218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140722/21e2f322/attachment.bin>

More information about the llvm-commits mailing list