llvm-project/llvm/test/CodeGen
Sanjay Patel 6a77e36975 [SDAG] adjust isNegatibleForFree calculation to avoid crashing
This is an alternate fix for the bug discussed in D70595.
This also includes minimal tests for other in-tree targets to show the problem more
generally.

We check the number of uses as a predicate for whether some value is free to negate,
but that use count can change as we rewrite the expression in getNegatedExpression().
So something that was marked free to negate during the cost evaluation phase becomes
not free to negate during the rewrite phase (or the inverse - something that was not
free becomes free). This can lead to a crash/assert because we expect that everything
in an expression that is negatible to be handled in the corresponding code within
getNegatedExpression().

This patch adds a hack to work-around the case where we probably no longer detect
that either multiply operand of an FMA isNegatibleForFree which is assumed to be
true when we started rewriting the expression.

Differential Revision: https://reviews.llvm.org/D70975
2019-12-17 13:49:15 -05:00
..
AArch64 [SDAG] adjust isNegatibleForFree calculation to avoid crashing 2019-12-17 13:49:15 -05:00
AMDGPU [AMDGPU] Update autogenerated checks 2019-12-17 16:48:02 +00:00
ARC
ARM [PGO][PGSO] Enable size optimizations in code gen / target passes for cold code. 2019-12-13 11:01:19 -08:00
AVR
BPF [BPF] put not-section-attribute externs into BTF ".extern" data section 2019-12-10 11:45:17 -08:00
Generic [CodeGen] [ExpandReduction] Fix the bug for ExpandReduction() when vector size isn't power of 2 2019-11-02 23:59:12 -04:00
Hexagon [ModuloSchedule] Fix a bug in experimental expander 2019-11-23 16:01:47 -08:00
Inputs
Lanai
MIR [llvm][MIRVRegNamerUtils] Adding hashing on CImm / FPImm MachineOperands. 2019-12-16 18:25:04 -05:00
MSP430 [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4) 2019-11-13 09:23:08 +01:00
Mips [Mips] Add support for min/max/umin/umax atomics 2019-12-12 11:32:37 +01:00
NVPTX [NVPTX] Added llvm.nvvm.mma.m8n8k4.* intrinsics 2019-10-28 13:55:30 -07:00
PowerPC [NFC][Test][PowerPC] Add the test to verify the mask with constant 2019-12-17 07:04:19 +00:00
RISCV [RISCV] Add subtargets initialized with target feature 2019-12-17 09:34:01 -08:00
SPARC Temporarily run machine-verifier once in test/CodeGen/SPARC/fp128.ll, so that 2019-12-03 11:21:52 +01:00
SystemZ [SystemZ][FPEnv] Back-end support for STRICT_[SU]INT_TO_FP 2019-12-17 18:24:05 +01:00
Thumb Revert "ARM-Darwin: keep the frame register reserved even if not updated." 2019-12-06 10:59:26 -08:00
Thumb2 [ARM][MVE][Intrinsics] All vqdmulhq/vqrdmulhq tests should be for signed numbers. 2019-12-13 17:29:59 +00:00
WebAssembly [WebAssembly] Replace SIMD int min/max builtins with patterns 2019-12-16 11:48:49 -08:00
WinCFGuard [WinCFG] Handle constant casts carefully in .gfids emission 2019-11-01 13:32:03 -07:00
WinEH
X86 [SDAG] adjust isNegatibleForFree calculation to avoid crashing 2019-12-17 13:49:15 -05:00
XCore