diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-10-13 17:47:25 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-10-13 17:47:25 +0000 |
| commit | c419c9f640deeeccc7de8afd84f5d54aa05c7136 (patch) | |
| tree | 38899221854c98390b424621941518fa789675e9 /llvm/test/Transforms | |
| parent | 399fcbea37afc33f9609652e4b085affa9164d83 (diff) | |
| download | bcm5719-llvm-c419c9f640deeeccc7de8afd84f5d54aa05c7136.tar.gz bcm5719-llvm-c419c9f640deeeccc7de8afd84f5d54aa05c7136.zip | |
[InstCombine] add hasOneUse check to add-zext-add fold to prevent increasing instructions
llvm-svn: 315718
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/add.ll | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/add.ll b/llvm/test/Transforms/InstCombine/add.ll index 728262a208a..e1fcbe0b1af 100644 --- a/llvm/test/Transforms/InstCombine/add.ll +++ b/llvm/test/Transforms/InstCombine/add.ll @@ -633,9 +633,8 @@ define <2 x i64> @test41vec_and_multiuse(<2 x i32> %a) { ; CHECK-LABEL: @test41vec_and_multiuse( ; CHECK-NEXT: [[ADD:%.*]] = add nuw <2 x i32> %a, <i32 16, i32 16> ; CHECK-NEXT: [[ZEXT:%.*]] = zext <2 x i32> [[ADD]] to <2 x i64> -; CHECK-NEXT: [[TMP1:%.*]] = add nuw <2 x i32> %a, <i32 15, i32 15> -; CHECK-NEXT: [[SUB:%.*]] = zext <2 x i32> [[TMP1]] to <2 x i64> -; CHECK-NEXT: [[EXTRAUSE:%.*]] = add nuw nsw <2 x i64> [[ZEXT]], [[SUB]] +; CHECK-NEXT: [[SUB:%.*]] = add nsw <2 x i64> [[ZEXT]], <i64 -1, i64 -1> +; CHECK-NEXT: [[EXTRAUSE:%.*]] = add nsw <2 x i64> [[SUB]], [[ZEXT]] ; CHECK-NEXT: ret <2 x i64> [[EXTRAUSE]] ; %add = add nuw <2 x i32> %a, <i32 16, i32 16> |

