The previous fix of widening divides that trap was too fragile as it depends on custom
authorMon P Wang <wangmp@apple.com>
Wed, 10 Feb 2010 23:37:45 +0000 (23:37 +0000)
committerMon P Wang <wangmp@apple.com>
Wed, 10 Feb 2010 23:37:45 +0000 (23:37 +0000)
commitf7ea6c3ee89e605c8d0bb7cdb0ade79706c750e8
tree5b933600bbd252a8a3f242e5ae9b3d49c42813a9
parent99efcf299fb522297dee43066f9c19df00813dcb
The previous fix of widening divides that trap was too fragile as it depends on custom
lowering and requires that certain types exist in ValueTypes.h.  Modified widening to
check if an op can trap and if so, the widening algorithm will apply only the op on
the defined elements.  It is safer to do this in widening because the optimizer can't
guarantee removing unused ops in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95823 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/scalar_widen_div.ll