diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2018-03-03 17:53:25 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2018-03-03 17:53:25 +0000 |
| commit | 1a8d5c3d1f43ebf7b07f1f009797e7d3eccebc60 (patch) | |
| tree | d0e252005e765d494b52480803e9eb14238216f3 /llvm/test/Transforms | |
| parent | 73eb2d255529c83e94b2e36d67060a14f60ce1a0 (diff) | |
| download | bcm5719-llvm-1a8d5c3d1f43ebf7b07f1f009797e7d3eccebc60.tar.gz bcm5719-llvm-1a8d5c3d1f43ebf7b07f1f009797e7d3eccebc60.zip | |
[InstCombine] (~X) - (~Y) --> Y - X
llvm-svn: 326660
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/sub.ll | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/Transforms/InstCombine/sub.ll b/llvm/test/Transforms/InstCombine/sub.ll index 595748674d0..405320ba74c 100644 --- a/llvm/test/Transforms/InstCombine/sub.ll +++ b/llvm/test/Transforms/InstCombine/sub.ll @@ -50,7 +50,7 @@ define i8 @notnotsub(i8 %x, i8 %y) { ; CHECK-LABEL: @notnotsub( ; CHECK-NEXT: [[NX:%.*]] = xor i8 [[X:%.*]], -1 ; CHECK-NEXT: [[NY:%.*]] = xor i8 [[Y:%.*]], -1 -; CHECK-NEXT: [[SUB:%.*]] = sub i8 [[NX]], [[NY]] +; CHECK-NEXT: [[SUB:%.*]] = sub i8 [[Y]], [[X]] ; CHECK-NEXT: call void @use8(i8 [[NX]]) ; CHECK-NEXT: call void @use8(i8 [[NY]]) ; CHECK-NEXT: ret i8 [[SUB]] @@ -65,9 +65,7 @@ define i8 @notnotsub(i8 %x, i8 %y) { define <2 x i8> @notnotsub_vec(<2 x i8> %x, <2 x i8> %y) { ; CHECK-LABEL: @notnotsub_vec( -; CHECK-NEXT: [[NX:%.*]] = xor <2 x i8> [[X:%.*]], <i8 -1, i8 -1> -; CHECK-NEXT: [[NY:%.*]] = xor <2 x i8> [[Y:%.*]], <i8 -1, i8 -1> -; CHECK-NEXT: [[SUB:%.*]] = sub <2 x i8> [[NX]], [[NY]] +; CHECK-NEXT: [[SUB:%.*]] = sub <2 x i8> [[Y:%.*]], [[X:%.*]] ; CHECK-NEXT: ret <2 x i8> [[SUB]] ; %nx = xor <2 x i8> %x, <i8 -1, i8 -1> |

