llvm-project/llvm/lib/Transforms
Sanjay Patel a003c728a5 [InstCombine] choose 1 form of abs and nabs as canonical
We already do this for min/max (see the blob above the diff), 
so we should do the same for abs/nabs.
A sign-bit check (<s 0) is used as a predicate for other IR 
transforms and it's likely the best for codegen.

This might solve the motivating cases for D47037 and D47041, 
but I think those patches still make sense. We can't guarantee 
this canonicalization if the icmp has more than one use.

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

llvm-svn: 332819
2018-05-20 14:23:23 +00:00
..
AggressiveInstCombine [AggressiveInstCombine] avoid crashing on unsimplified code (PR37446) 2018-05-14 13:43:32 +00:00
Coroutines Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Hello
IPO In thin and full LTO + CFI, direct function calls may go through jump table 2018-05-17 14:29:07 +00:00
InstCombine [InstCombine] choose 1 form of abs and nabs as canonical 2018-05-20 14:23:23 +00:00
Instrumentation [msan] Don't check divisor shadow in fdiv. 2018-05-18 20:19:53 +00:00
ObjCARC [WebAssembly] Add Wasm personality and isScopedEHPersonality() 2018-05-17 20:52:03 +00:00
Scalar [IRCE] Fix miscompile with range checks against negative values 2018-05-19 13:06:37 +00:00
Utils Fix evaluator for non-zero alloca addr space 2018-05-19 02:58:16 +00:00
Vectorize Reverted r332654 as it has broken some buildbots and left unfixed for a long time. 2018-05-18 18:14:06 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00