Matt Arsenault
878827d93a
DAG: Fold fma (fneg x), K, y -> fma x, -K, y
...
llvm-svn: 316753
2017-10-27 09:06:07 +00:00
Matt Arsenault
6c29c5acfe
AMDGPU: Allow SIShrinkInstructions to work in non-SSA
...
Immediates can be folded as long as the immediate is a vreg.
Also undo commuting instructions if it didn't fold an immediate.
llvm-svn: 307575
2017-07-10 19:53:57 +00:00
Alexander Timofeev
982aee6a38
[AMDGPU] Switch scalarize global loads ON by default
...
Differential revision: https://reviews.llvm.org/D34407
llvm-svn: 307097
2017-07-04 17:32:00 +00:00
NAKAMURA Takumi
e4a741376b
Revert r307026, "[AMDGPU] Switch scalarize global loads ON by default"
...
It broke a testcase.
Failing Tests (1):
LLVM :: CodeGen/AMDGPU/alignbit-pat.ll
llvm-svn: 307054
2017-07-04 02:14:18 +00:00
Alexander Timofeev
ea7f08bee5
[AMDGPU] Switch scalarize global loads ON by default
...
Differential revision: https://reviews.llvm.org/D34407
llvm-svn: 307026
2017-07-03 14:54:11 +00:00
Chad Rosier
84a238dd62
[DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).
...
Differential Revision: http://reviews.llvm.org/D32596
llvm-svn: 302153
2017-05-04 14:14:44 +00:00
Matt Arsenault
3dbeefa978
AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel
...
Currently the default C calling convention functions are treated
the same as compute kernels. Make this explicit so the default
calling convention can be changed to a non-kernel.
Converted with perl -pi -e 's/define void/define amdgpu_kernel void/'
on the relevant test directories (and undoing in one place that actually
wanted a non-kernel).
llvm-svn: 298444
2017-03-21 21:39:51 +00:00
Matt Arsenault
e7d8ed32f9
AMDGPU: Swap order of operands in fadd/fsub combine
...
FMA is canonicalized to constant in the middle operand. Do
the same so fmad matches and avoid an extra combine step.
llvm-svn: 290313
2016-12-22 04:03:40 +00:00
Matt Arsenault
770ec8680a
AMDGPU: Form more FMAs if fusion is allowed
...
Extend the existing fadd/fsub->fmad combines to produce
FMA if allowed.
llvm-svn: 290311
2016-12-22 03:55:35 +00:00