llvm-project/llvm/test
Mehrnoosh Heidarpour 29f189f90d [InstCombine] Conditionally emit nowrap flags when combining two adds
Currently, the InstCombineCompare is combining two add operations
into a single add operation which always has a nsw flag, without
checking the conditions to see if this flag should be present
according to the original two add operations or not.

This patch will change the InstCombineCompare to emit the nsw or
nuw only when these flags are allowed to be generated according to
the original add operations and remove the possibility of applying
wrong optimization with passes that will perform on the IR later
in the pipeline.

To confirm that the current results are buggy and the results after
proposed patch are the correct IR the following examples from Alive2
are attached; the same results can be seen in the case of nuw flag
and nsw is just used as an example. The following link shows that
the generated IR with current LLVM is a buggy IR when none of the
original add operations have nsw flag.
https://alive2.llvm.org/ce/z/WGaDrm
The following link proves that the generated IR after the patch in
the former case is the correct IR.
https://alive2.llvm.org/ce/z/wQ7G_e

Differential Revision: https://reviews.llvm.org/D100095
2021-04-14 20:53:06 +02:00
..
Analysis [ValueTracking] Don't require strictly positive for mul nsw recurrence 2021-04-14 19:39:59 +02:00
Assembler Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
Bindings [OCaml][Test] Fix and enable debuginfo.ml test 2021-03-28 06:25:39 +05:30
Bitcode Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
BugPoint
CodeGen [WebAssembly] Codegen for f64x2.convert_low_i32x4_{s,u} 2021-04-14 10:42:45 -07:00
DebugInfo Revert "Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands"" 2021-04-12 20:10:17 -07:00
Demangle
Examples [Orc][examples] Add missing FileCheck for lit test and polish output 2021-04-07 11:12:20 +02:00
ExecutionEngine [lli] Leaving two EH frame tests with MCJIT only after PowerPC failure 2021-03-30 12:28:22 +02:00
Feature [FunctionAttrs] Force old pm in test so it doens't behave differently depending on the configuration setting for this flag 2021-04-09 11:46:19 +02:00
FileCheck [FileCheck] Fix -dump-input per-pattern diagnostic indexing 2021-03-27 10:36:21 -04:00
Instrumentation [SantizerCoverage] handle missing DBG MD when inserting libcalls 2021-04-12 15:55:58 -07:00
Integer Re-apply "[lli] Make -jit-kind=orc the default JIT engine" 2021-03-30 12:08:26 +02:00
JitListener
LTO Remove dead CHECK-ERR line. 2021-03-30 09:31:00 -07:00
Linker Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
MC [ARM] [COFF] Properly produce cross-section relative relocations 2021-04-14 12:31:28 +03:00
MachineVerifier [GlobalISel] Add G_ROTR and G_ROTL opcodes for rotates. 2021-03-25 17:23:30 -07:00
Object [TextAPI] Add support for arm64_32 2021-04-01 17:19:12 -07:00
ObjectYAML [lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right order. 2021-04-09 05:29:14 +04:00
Other [lit] Remove unnecessary testcases from lit-quoting.txt that fail on macOS 2021-04-14 15:09:42 +03:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen] Resolve concrete but not complete field access initializers 2021-04-13 15:14:56 -07:00
ThinLTO/X86 Revert "[GlobalOpt] Revert valgrind hacks" 2021-04-13 17:47:07 -07:00
Transforms [InstCombine] Conditionally emit nowrap flags when combining two adds 2021-04-14 20:53:06 +02:00
Unit
Verifier [DebugInfo] Upgrade DISubragne::count to accept DIExpression also 2021-03-30 09:16:55 +05:30
YAMLParser
tools [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling 2021-04-10 12:39:10 -07:00
.clang-format
CMakeLists.txt Conditionalize the JIT test dependency 2021-03-30 13:04:02 -07:00
TestRunner.sh
lit.cfg.py [Orc][examples] Add lit ToolSubst for LLJITWithRemoteDebugging example 2021-04-07 09:47:04 +02:00
lit.site.cfg.py.in