[PATCH] D89050: Add support for !noundef metatdata on loads

Malhar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 06:54:00 PST 2022


malharJ added a comment.
Herald added a subscriber: dexonsmith.

Hi everyone,

If you would be so kind as to help me out here,
I'm interested in knowing if it's possible to write C/C++ code in a way that can translate to a load with !noundef metadata ?

(Background:

I came across this patch while debugging an optimization (specifically the select ---> and/or folding)  in InstCombine ...
I am trying to enable that transform and one of the ways I was attempting it was to ensure that the operands of the select instruction 
are well-defined values.

In my case the C/C++ code has array accesses so it translates to loads in the IR, and currently these loads do not have this !noundef metadata
attached to it so the loaded values can potentially be undef/poison values.

so I am trying to find a way if something in C/C++ code can be written in a way so as to generate loads with this metadata)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89050/new/

https://reviews.llvm.org/D89050



More information about the llvm-commits mailing list