OSDN Git Service

Fix a miscompilation of:
authorChris Lattner <sabre@nondot.org>
Fri, 6 Oct 2006 17:34:12 +0000 (17:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 Oct 2006 17:34:12 +0000 (17:34 +0000)
commit4bdd2753db4a9d92b64c68b042c8b38f7223238d
tree00513de903bcf6e9a886cb51799129110b9aba4a
parentaf1dabef358895da483617b6f5cbd25b60b6f410
Fix a miscompilation of:

long long foo(long long X) {
  return (long long)(signed char)(int)X;
}

Instead of:

_foo:
        extsb r2, r4
        srawi r3, r4, 31
        mr r4, r2
        blr

we now produce:

_foo:
        extsb r4, r4
        srawi r3, r4, 31
        blr

This fixes a miscompilation in ConstantFolding.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30768 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp