[InstCombine] add tests for ext-of-bool + add/sub; NFC
authorSanjay Patel <spatel@rotateright.com>
Tue, 29 Jan 2019 16:39:23 +0000 (16:39 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 29 Jan 2019 16:39:23 +0000 (16:39 +0000)
commitf044d1884d9819430906e921490cd62530731fb6
tree9864baa67be7ac31a48c918011c0fae22e943316
parent5d71fc5d7b5ffe2323418a09db6eddaf84d6c662
[InstCombine] add tests for ext-of-bool + add/sub; NFC

We should choose one of these as canonical:

  %z = zext i1 %cmp to i32
  %r = sub i32 %x, %z
  =>
  %s = sext i1 %cmp to i32
  %r = add i32 %x, %s

The test comments assume that the zext form is better,
but we can adjust that if we decide to go the other way.

llvm-svn: 352515
llvm/test/Transforms/InstCombine/zext-bool-add-sub.ll