[CodeGenPrepare] Handle zero extensions in the TypePromotionHelper.
authorQuentin Colombet <qcolombet@apple.com>
Thu, 13 Nov 2014 01:44:51 +0000 (01:44 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Thu, 13 Nov 2014 01:44:51 +0000 (01:44 +0000)
commite8a8deab8c744ab8986146086b1f92da9bab534a
treece127421513ca6d68fa6ed07033e2aa6f4c53514
parent7ccd2f5df289249c1ff11b124892490dc995c598
[CodeGenPrepare] Handle zero extensions in the TypePromotionHelper.

Prior to this patch the TypePromotionHelper was promoting only sign extensions.
Supporting zero extensions changes:
- How constants are extended.
- How sign extensions, zero extensions, and truncate are composed together.
- How the type of the extended operation is recorded. Now we need to know the
  kind of the extension as well as its type.

Each change is fairly small, unlike the diff.
Most of the diff are comments/variable renaming to say "extension" instead of
"sign extension".

The performance improvements on the test suite are within the noise.

Related to <rdar://problem/18310086>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221851 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp
test/CodeGen/X86/codegen-prepare-addrmode-sext.ll