diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-10-13 16:15:37 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-10-13 16:15:37 +0000 |
commit | 47579b21e2043a69832a1378e85f1e545abfef08 (patch) | |
tree | 2f0dda4702edd27635e61d71851bceac0bb24032 /llvm/test/Transforms/InstCombine/operand-complexity.ll | |
parent | c5d7c6e5f68476fae3144fb2500bbf6d807555b3 (diff) | |
download | bcm5719-llvm-47579b21e2043a69832a1378e85f1e545abfef08.tar.gz bcm5719-llvm-47579b21e2043a69832a1378e85f1e545abfef08.zip |
[InstCombine] fix complexity canonicalization with fake unary vector ops
This is a preliminary step to avoid regressions when we add
an actual 'fneg' instruction to IR. See D52934 and D53205.
llvm-svn: 344458
Diffstat (limited to 'llvm/test/Transforms/InstCombine/operand-complexity.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/operand-complexity.ll | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/operand-complexity.ll b/llvm/test/Transforms/InstCombine/operand-complexity.ll index 747b0c836a5..20abe7b48f9 100644 --- a/llvm/test/Transforms/InstCombine/operand-complexity.ll +++ b/llvm/test/Transforms/InstCombine/operand-complexity.ll @@ -33,7 +33,7 @@ define <2 x i8> @neg_vec_undef(<2 x i8> %x) { ; CHECK-LABEL: @neg_vec_undef( ; CHECK-NEXT: [[BO:%.*]] = udiv <2 x i8> [[X:%.*]], <i8 42, i8 -42> ; CHECK-NEXT: [[NEGX:%.*]] = sub <2 x i8> <i8 0, i8 undef>, [[X]] -; CHECK-NEXT: [[R:%.*]] = mul <2 x i8> [[NEGX]], [[BO]] +; CHECK-NEXT: [[R:%.*]] = mul <2 x i8> [[BO]], [[NEGX]] ; CHECK-NEXT: ret <2 x i8> [[R]] ; %bo = udiv <2 x i8> %x, <i8 42, i8 -42> @@ -74,7 +74,7 @@ define <2 x i8> @not_vec_undef(<2 x i8> %x) { ; CHECK-LABEL: @not_vec_undef( ; CHECK-NEXT: [[BO:%.*]] = udiv <2 x i8> [[X:%.*]], <i8 42, i8 -42> ; CHECK-NEXT: [[NOTX:%.*]] = xor <2 x i8> [[X]], <i8 -1, i8 undef> -; CHECK-NEXT: [[R:%.*]] = mul <2 x i8> [[NOTX]], [[BO]] +; CHECK-NEXT: [[R:%.*]] = mul <2 x i8> [[BO]], [[NOTX]] ; CHECK-NEXT: ret <2 x i8> [[R]] ; %bo = udiv <2 x i8> %x, <i8 42, i8 -42> @@ -123,7 +123,7 @@ define <2 x float> @fneg_vec_undef(<2 x float> %x) { ; CHECK-LABEL: @fneg_vec_undef( ; CHECK-NEXT: [[BO:%.*]] = fdiv <2 x float> [[X:%.*]], <float 4.200000e+01, float -4.200000e+01> ; CHECK-NEXT: [[FNEGX:%.*]] = fsub <2 x float> <float -0.000000e+00, float undef>, [[X]] -; CHECK-NEXT: [[R:%.*]] = fmul <2 x float> [[FNEGX]], [[BO]] +; CHECK-NEXT: [[R:%.*]] = fmul <2 x float> [[BO]], [[FNEGX]] ; CHECK-NEXT: call void @use_vec(<2 x float> [[FNEGX]]) ; CHECK-NEXT: ret <2 x float> [[R]] ; |