llvm-6502/lib/Transforms
David Majnemer 3bbb4b15ae InstCombine: Fix a potential bug in 0 - (X sdiv C) -> (X sdiv -C)
While *most* (X sdiv 1) operations will get caught by InstSimplify, it
is still possible for a sdiv to appear in the worklist which hasn't been
simplified yet.

This means that it is possible for 0 - (X sdiv 1) to get transformed
into (X sdiv -1); dividing by -1 can make the transform produce undef
values instead of the proper result.

Sorry for the lack of testcase, it's a bit problematic because it relies
on the exact order of operations in the worklist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215818 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-16 09:23:42 +00:00
..
Hello [CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32. 2014-07-13 13:36:48 +00:00
InstCombine InstCombine: Fix a potential bug in 0 - (X sdiv C) -> (X sdiv -C) 2014-08-16 09:23:42 +00:00
Instrumentation Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
IPO [optnone] Make the optnone attribute effective at suppressing function 2014-08-13 10:49:33 +00:00
ObjCARC Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Scalar Introduce a helper to combine instruction metadata. 2014-08-15 15:46:38 +00:00
Utils Introduce a helper to combine instruction metadata. 2014-08-15 15:46:38 +00:00
Vectorize Introduce a helper to combine instruction metadata. 2014-08-15 15:46:38 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile