1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/lib/CodeGen/SelectionDAG
Sanjay Patel 80150ed05d [DAG] use SDNode flags 'nsz' to enable fadd/fsub with zero folds
As discussed in D24815, let's start the process of killing off the broken fast-math global
state housed in TargetOptions and eliminate the need for function-level fast-math attributes.

Here we enable two similar folds that are possible when we don't care about signed-zero:
fadd nsz x, 0 --> x
fsub nsz 0, x --> -x

Note that although the test cases include a 'sin' function call, I'm side-stepping the 
FMF-on-calls question (and lack of support in the DAG) for now. It's not needed for these
tests - isNegatibleForFree/GetNegatedExpression just look through a ISD::FSIN node.

Also, when we create an FNEG node and propagate the Flags of the FSUB to it, this doesn't
actually do anything today because Flags are silently dropped for any node that is not a
binary operator.

Differential Revision: https://reviews.llvm.org/D25297

llvm-svn: 284824
2016-10-21 14:36:58 +00:00
..
CMakeLists.txt
DAGCombiner.cpp [DAG] use SDNode flags 'nsz' to enable fadd/fsub with zero folds 2016-10-21 14:36:58 +00:00
FastISel.cpp swifterror: Don't compute swifterror vregs during instruction selection 2016-10-07 22:06:55 +00:00
FunctionLoweringInfo.cpp [WinEH] Allow catchpads to reuse the same catch object 2016-10-19 17:08:23 +00:00
InstrEmitter.cpp Remove unnecessary call to getAllocatableRegClass 2016-09-07 06:16:45 +00:00
InstrEmitter.h Pass DebugLoc and SDLoc by const ref. 2016-06-12 15:39:02 +00:00
LegalizeDAG.cpp [DAG] optimize negation of bool 2016-10-19 16:58:59 +00:00
LegalizeFloatTypes.cpp [CodeGen] Split out the notions of MI invariance and MI dereferenceability. 2016-09-11 01:38:58 +00:00
LegalizeIntegerTypes.cpp Fix *_EXTEND_VECTOR_INREG legalization 2016-10-20 17:56:36 +00:00
LegalizeTypes.cpp getValueType().getScalarSizeInBits() -> getScalarValueSizeInBits(), round 2 ; NFCI 2016-09-14 16:54:10 +00:00
LegalizeTypes.h [SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal 2016-10-10 20:45:15 +00:00
LegalizeTypesGeneric.cpp getValueType().getSizeInBits() -> getValueSizeInBits() ; NFCI 2016-09-14 16:05:51 +00:00
LegalizeVectorOps.cpp getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI 2016-09-14 16:37:15 +00:00
LegalizeVectorTypes.cpp getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI 2016-09-14 16:37:15 +00:00
LLVMBuild.txt
ResourcePriorityQueue.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
ScheduleDAGFast.cpp
ScheduleDAGRRList.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
ScheduleDAGSDNodes.cpp SelectionDAG: Avoid implicit iterator conversions in ScheduleDAGSDNodes, NFC 2016-07-08 19:07:09 +00:00
ScheduleDAGSDNodes.h
ScheduleDAGVLIW.cpp
SDNodeDbgValue.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
SelectionDAG.cpp [DAG] use isConstOrConstSplat in ComputeNumSignBits to optimize SRA 2016-10-17 20:41:39 +00:00
SelectionDAGBuilder.cpp [MachineMemOperand] Move synchronization scope and atomic orderings from SDNode to MachineMemOperand, and remove redundant getAtomic* member functions from SelectionDAG. 2016-10-15 22:01:18 +00:00
SelectionDAGBuilder.h Delete some dead code in SelectionDAG (NFC) 2016-10-06 22:53:43 +00:00
SelectionDAGDumper.cpp Create llvm.addressofreturnaddress intrinsic 2016-10-12 22:13:19 +00:00
SelectionDAGISel.cpp Silence -Wunused-but-set-variable warning 2016-10-11 19:49:29 +00:00
SelectionDAGPrinter.cpp
SelectionDAGTargetInfo.cpp
StatepointLowering.cpp getValueType().getSizeInBits() -> getValueSizeInBits() ; NFCI 2016-09-14 16:05:51 +00:00
StatepointLowering.h
TargetLowering.cpp TargetLowering: Add SimplifyDemandedBits() helper to TargetLoweringOpt 2016-10-14 19:14:26 +00:00