[PATCH] D125404: [SPIR-V] Add simple tests to improve test coverage

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 10:41:03 PDT 2022


MaskRay added a comment.

The style looks good to me, but hope someone familiar with SPIR-V to do a proper review.



================
Comment at: llvm/test/CodeGen/SPIRV/TruncToBool.ll:23
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
----------------
Consider removing unneeded attributes to reduce noise of the test.


================
Comment at: llvm/test/CodeGen/SPIRV/llvm-intrinsics/ctpop.ll:37
+; Function Attrs: inaccessiblememonly nounwind willreturn
+declare i8 @llvm.ctpop.i8(i8  ) #1
+
----------------
The excess spaces after `i8` should be removed. You can see that Clang -emit-llvm -S doesn't add spaces (for at least the majority of targets). 


================
Comment at: llvm/test/CodeGen/SPIRV/llvm-intrinsics/ctpop.ll:40
+; Function Attrs: inaccessiblememonly nounwind willreturn
+declare i16 @llvm.ctpop.i16(i16 ) #1
+
----------------
#1 does not exist and should be removed.


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/OpVectorExtractDynamic.ll:32
+!3 = !{!"float*", !"float2", !"int"}
+!4 = !{!"float*", !"float2", !"int"}
+!5 = !{!"", !"", !""}
----------------
!3 == !4. Why keep both?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125404/new/

https://reviews.llvm.org/D125404



More information about the llvm-commits mailing list