<div dir="ltr"><div>Excellent help Greg! Thank you so much for this! Really appreciate it.</div><div><br></div><div>Atul.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 19, 2017 at 6:30 AM, Greg Parker <span dir="ltr"><<a href="mailto:gparker@apple.com" target="_blank">gparker@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Dec 13, 2017, at 10:47 PM, Atul Sowani via swift-dev <<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> clang_inline_opt.swift test case is failing on ppc64le with following error:<br>
><br>
> /root/swift-source/swift/test/<wbr>IRGen/clang_inline_opt.swift:<wbr>10:11: error: expected string not found in input<br>
> // CHECK: define internal i32 @return7() [[CLANG_ATTRS:#[0-9]+]] {<br>
> ^<br>
> <stdin>:1:1: note: scanning from here<br>
> ; ModuleID = '-'<br>
> ^<br>
> <stdin>:34:1: note: possible intended match here<br>
> define internal zeroext i32 @return7() #1 {<br>
> ^<br>
><br>
> On ppc64le, following change is required to the CHECK string:<br>
> // CHECK: define internal zeroext i32 @return7() [[CLANG_ATTRS:#[0-9]+]] {<br>
><br>
> The original string is:<br>
> // CHECK: define internal i32 @return7() [[CLANG_ATTRS:#[0-9]+]] {<br>
><br>
> How do I add a new CHECK to this file? I tried using CHECK-powerpc64le but that doesn't work.<br>
<br>
</span>Using an architecture-specific CHECK directive such as CHECK-powerpc64le requires additional changes to the RUN line. The CHECK variations need to be explained to FileCheck using the --check-prefix option.<br>
<br>
Look at tests IRGen/c_layout.sil or IRGen/condfail.sil for examples.<br>
<br>
Another possibility for this particular case is to allow `zeroext` on all platforms, on the assumption that the presence or absence of zeroext isn't what the test really wants to check. You could use a FileCheck regex to do that. Then you don't need the complication of an architecture-specific CHECK line. Try this:<br>
// CHECK: define internal{{( zeroext)?}} i32 @return7() [[CLANG_ATTRS:#[0-9]+]] {<br>
<span><br>
<br>
> Second alternative is to disable this test on ppc64le. For this I tried to introduce following 2 lines to the clang_inline_opt.swift file by looking at other similar files:<br>
> // REQUIRES: CPU=i386 || CPU=x86_64<br>
> // XFAIL: Linux<br>
><br>
> But this too is not working, How do I make this test skip on ppc64le otherwise?<br>
<br>
</span>The simple way to disable the test on ppc64le is probably spelled like this:<br>
// UNSUPPORTED: CPU=powerpc64le<br>
But making the test work for ppc64le is generally preferred.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Greg Parker <a href="mailto:gparker@apple.com">gparker@apple.com</a> Runtime Wrangler<br>
<br>
<br>
</font></span></blockquote></div><br></div>