This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Remove assert from AMDGPUOpenCLImageTypeLowering pass
ClosedPublic

Authored by tstellarAMD on Oct 1 2015, 10:52 AM.

Details

Summary

Instead of asserting when the kernel metadata is different than we expect,
we should just skip lowering that function. This fixes assertion
failures with OpenCL argument metadata from older LLVM releases.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Remove assert from AMDGPUOpenCLImageTypeLowering pass.
tstellarAMD updated this object.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: llvm-commits.
arsenm added inline comments.Oct 1 2015, 11:28 AM
lib/Target/AMDGPU/AMDGPUOpenCLImageTypeLoweringPass.cpp
100 ↗(On Diff #36274)

If you're bothering to check this should probably be a checked dyn_cast

Use dyn_cast()

arsenm accepted this revision.Oct 1 2015, 11:58 AM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 1 2015, 11:58 AM
This revision was automatically updated to reflect the committed changes.