Skip to content

[SYCL-MLIR] Fix build with clang #7535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

whitneywhtsang
Copy link
Contributor

This PR fixes lit failures when building with clang.

Since 9ac759f, when building with clang, there are two lit failures:

Failed Tests (2):
  cgeist :: Verification/memrefaddassign.cpp
  cgeist :: Verification/ptrarith.c

They crash with traceback:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /localdisk2/waihungt/llvm/build/bin/cgeist /localdisk2/waihungt/llvm/polygeist/tools/cgeist/Test/Verification/ptrarith.c --function=* -S
1.      <eof> parser at end of file
 #0 0x00007f1836120043 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/localdisk2/waihungt/llvm/build/bin/../lib/libLLVMSupport.so.16git+0x1e8043)
 #1 0x00007f183611de5e llvm::sys::RunSignalHandlers() (/localdisk2/waihungt/llvm/build/bin/../lib/libLLVMSupport.so.16git+0x1e5e5e)
 #2 0x00007f183612052f SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f1849701b20 __restore_rt sigaction.c:0:0
 #4 0x00000000004d9a6e ValueCategory::SubIndex(mlir::OpBuilder&, mlir::Location, mlir::Type, mlir::Value, bool) const (/localdisk2/waihungt/llvm/build/bin/cgeist+0x4d9a6e)
 #5 0x00000000004da11f ValueCategory::GEPOrSubIndex(mlir::OpBuilder&, mlir::Location, mlir::Type, mlir::ValueRange, bool) const (/localdisk2/waihungt/llvm/build/bin/cgeist+0x4da11f)
 #6 0x00000000004da1bd ValueCategory::InBoundsGEPOrSubIndex(mlir::OpBuilder&, mlir::Location, mlir::Type, mlir::ValueRange) const (/localdisk2/waihungt/llvm/build/bin/cgeist+0x4da1bd)
 #7 0x00000000004b0394 MLIRScanner::EmitCheckedInBoundsPtrOffsetOp(mlir::Type, ValueCategory, mlir::ValueRange, bool, bool) (/localdisk2/waihungt/llvm/build/bin/cgeist+0x4b0394)

Signed-off-by: Tsang, Whitney whitney.tsang@intel.com

@whitneywhtsang whitneywhtsang added the sycl-mlir Pull requests or issues for sycl-mlir branch label Nov 24, 2022
@whitneywhtsang whitneywhtsang self-assigned this Nov 24, 2022
Signed-off-by: Tsang, Whitney <whitney.tsang@intel.com>
@whitneywhtsang whitneywhtsang merged commit ad35977 into intel:sycl-mlir Nov 24, 2022
@whitneywhtsang whitneywhtsang deleted the clang branch November 24, 2022 19:04
@victor-eds
Copy link
Contributor

Just for curiosity: Do you know why is this caused?

@whitneywhtsang
Copy link
Contributor Author

Just for curiosity: Do you know why is this caused?

Good question, not too sure, likely clang expects optional to be used with has_value() and value(), instead of *.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sycl-mlir Pull requests or issues for sycl-mlir branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants