ARM FastISel fix sext/zext fold
authorJF Bastien <jfb@google.com>
Tue, 11 Jun 2013 22:13:46 +0000 (22:13 +0000)
committerJF Bastien <jfb@google.com>
Tue, 11 Jun 2013 22:13:46 +0000 (22:13 +0000)
commit3c6bb8e19f0671f2184e45a38e7a965cd787b13d
treec1d5a52a0eb9b7863d060e057cb3493ba2ccdb0d
parentb0c72d99dc912ae672a5e6db86e9fc2b11f8bfb0
ARM FastISel fix sext/zext fold

Sign- and zero-extension folding was slightly incorrect because it wasn't checking that the shift on extensions was zero. Further, I recently added AND rd, rn, #255 as a form of 8-bit zero extension, and failed to add the folding code for it.

This patch fixes both issues.

This patch fixes both, and the test should remain the same:
  test/CodeGen/ARM/fast-isel-fold.ll

llvm-svn: 183794
llvm/lib/Target/ARM/ARMFastISel.cpp