[PATCH] D11678: [CodeGen] Fixes *absdiff* intrinsic: LangRef doc/test case improvement and corresponding code change
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 17:32:44 PDT 2015
ab added a comment.
Thanks for the changes!
I'm still uncomfortable with the tests. The explicit CHECK-NEXT approach would apply much better to the smaller tests in _128.ll than the big v16i16 one, I think. Regexes would also help make the tests less brittle while keeping them as useful.
Also, should we merge the two test files together? IMO, the _128/_256 distinction isn't very useful.
================
Comment at: test/CodeGen/X86/absdiff_128.ll:66-67
@@ +65,4 @@
+; CHECK: movd
+; CHECK-DAG: movzbl {{.*}}, {{%.*}}
+; CHECK-DAG: movzbl {{.*}}, {{%.*}}
+; CHECK: subl
----------------
These lines could be simplified into:
```
; CHECK: movzbl
; CHECK: movzbl
```
Ditto for others, e.g. pextrw below.
================
Comment at: test/CodeGen/X86/absdiff_256.ll:25-27
@@ +24,5 @@
+; CHECK-NEXT: pandn %xmm1, %xmm5
+; CHECK-DAG: psubw %xmm1, %xmm4
+; CHECK-DAG: pxor %xmm0, %xmm3
+; CHECK: pandn %xmm4, %xmm3
+; CHECK-NEXT: por %xmm5, %xmm3
----------------
Why do these need CHECK-DAG?
http://reviews.llvm.org/D11678
More information about the llvm-commits
mailing list