This Patch corrects a problem whereby the optimization to use a faster divide
authorPreston Gurd <preston.gurd@intel.com>
Wed, 3 Oct 2012 16:11:44 +0000 (16:11 +0000)
committerPreston Gurd <preston.gurd@intel.com>
Wed, 3 Oct 2012 16:11:44 +0000 (16:11 +0000)
commitfcf0628d93d759ae36106f7a738f66cb77badc79
treeb9ab528ae4cfa2f4d7ac0fb90d7dd56512059b2c
parentc653de6c0f3722154a41cbb57c213a0cdd789419
This Patch corrects a problem whereby the optimization to use a faster divide
instruction (for Intel Atom) was not being done by Clang, because
the type context used by Clang is not the default context.

It fixes the problem by getting the global context types for each div/rem
instruction in order to compare them against the types in the BypassTypeMap.

Tests for this will be done as a separate patch to Clang.

Patch by Tyler Nowicki.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165126 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/BypassSlowDivision.cpp