llvm-6502/lib
Sanjay Patel 6902c687b0 Optimize vector fabs of bitcasted constant integer values.
Allow vector fabs operations on bitcasted constant integer values to be optimized
in the same way that we already optimize scalar fabs.

So for code like this:
%bitcast = bitcast i64 18446744069414584320 to <2 x float> ; 0xFFFF_FFFF_0000_0000
%fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
%ret = bitcast <2 x float> %fabs to i64

Instead of generating something like this:

movabsq (constant pool loadi of mask for sign bits)
vmovq   (move from integer register to vector/fp register)
vandps  (mask off sign bits)
vmovq   (move vector/fp register back to integer return register)

We should generate:

mov     (put constant value in return register)

I have also removed a redundant clause in the first 'if' statement:
N0.getOperand(0).getValueType().isInteger()

is the same thing as:
IntVT.isInteger()

Testcases for x86 and ARM added to existing files that deal with vector fabs.
One existing testcase for x86 removed because it is no longer ideal.

For more background, please see:
http://reviews.llvm.org/D4770

And:
http://llvm.org/bugs/show_bug.cgi?id=20354

Differential Revision: http://reviews.llvm.org/D4785


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214892 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-05 17:35:22 +00:00
..
Analysis Teach the SLP Vectorizer that keeping some values live over a callsite can have a cost. 2014-08-05 12:30:34 +00:00
AsmParser Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
Bitcode UseListOrder: Fix blockaddress use-list order 2014-08-01 22:27:19 +00:00
CodeGen Optimize vector fabs of bitcasted constant integer values. 2014-08-05 17:35:22 +00:00
DebugInfo DWOHolder takes ownership of the argument constructor, use std::unique_ptr. 2014-07-31 20:26:42 +00:00
ExecutionEngine Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
IR Provide convenient access to the zext/sext attributes of function arguments. NFC. 2014-08-05 05:43:41 +00:00
IRReader
LineEditor
Linker
LTO Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
MC Enable Darwin vararg parameters support in assembler macros. 2014-08-04 23:14:37 +00:00
Object A std::unique_ptr case I missed in the previous patch. 2014-07-31 03:36:00 +00:00
Option
ProfileData Coverage: add HasCodeBefore flag to a mapping region. 2014-08-04 18:00:51 +00:00
Support Path: Stop claiming path::const_iterator is bidirectional 2014-08-04 17:36:41 +00:00
TableGen Allow binary and for tblgen math. 2014-08-05 09:43:25 +00:00
Target [AVX512] Add masking variant and intrinsics for valignd/q 2014-08-05 17:23:04 +00:00
Transforms Teach the SLP Vectorizer that keeping some values live over a callsite can have a cost. 2014-08-05 12:30:34 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile