[PATCH] Add intrinsic definitions for unary op AVX instructions [x86]
spatel at rotateright.com
Wed Feb 18 16:41:32 PST 2015
Patch updated to include new intrinsics in the memory folding table. Also added AVX test cases for load folding of each unary op.
In the interest of patch minimalism, I'm not fixing the SSE variants of these in this patch. The loads in the new test cases are not getting folded without -mattr=avx. Presumably this is because we don't have patterns to match those and/or the load folding tables have holes. It's still not clear to me exactly when the pattern is matched vs. peephole pass load folding is needed.
I also did not add the new intrinsics to the switch in hasUndefRegUpdate(). Please correct me if I'm misunderstanding, but these additions are AVX-only and don't have any partial update problem. It seems like a bug to me that the existing AVX unop instructions are in that switch because the destination register is not partially updated - the 2nd source operand high bits are passed through, so the destination register is always fully updated.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7352 bytes
Desc: not available
More information about the llvm-commits