[llvm-commits] [PATCH] Test cases for constant gep's with various address spaces.

Micah Villmow villmow at gmail.com
Thu Oct 25 14:07:13 PDT 2012


  The various files are just the same test but with various address spaces and pointer sizes being tested. This was done to make sure it is handling all the common cases correctly. Anything relevant to -as0 also applies to -as[1-5].


================
Comment at: test/Transforms/InstCombine/opt-constant-fold-gep-0.ll:76-78
@@ +75,5 @@
+
+; OPT: define i8 addrspace(1)* @goo8() nounwind {
+; OPT:   ret i8 addrspace(1)* null
+; OPT: }
+; OPT: define i1 addrspace(2)* @goo1() nounwind {
----------------
Chandler Carruth wrote:
> Rather than testing the exact output of the function, you should sink this to live next to the function, and do a more weak assertion:
> 
> define i8 addrspace(1)* @goo8() {
> ; CHECK: @goo8
> ; CHECK: ret i8 addrspace(1)* null
>   ret ....
> }
This is legacy because of the test I inherited this from, I'll clean it up(Same with most of the other comments).


http://llvm-reviews.chandlerc.com/D79



More information about the llvm-commits mailing list