Adapted from the llvm.SI.sample test. Reviewed-by: Christian König <christian.koenig@amd.com> llvm-svn: 181425