HomePhabricator

[InstCombine] Transform to undef incorrect atomic unordered mem intrinsics

Authored by skatkov on Mar 16 2020, 12:15 AM.

Description

[InstCombine] Transform to undef incorrect atomic unordered mem intrinsics

According to LangRef:
If len is not a positive integer multiple of element_size, then the behaviour of the intrinsic is undefined.

Add InstCombine rule to transform intrinsic to undef operation.

This is a follow-up for D76116.

Reviewers: reames
Reviewed By: reames
Subscribers: hiraditya, jfb, dantrushin, llvm-commits
Differential Revision: https://reviews.llvm.org/D76215