Is it worthwhile and possible to add flag like nsw,nuw to Use instead of def or inst?

For C code below:

void foo(int a){
  if(0 < a && a < 100)

EarlyCSE merges inner a+a into outer a+a, and therefore IPSCCP fails to add nuw,nsw flag to inner use of (a + a). We fail to fold (a+a)/a into 2 here. This occurs everywhere passes check overflow flags.

For this reason, I thought about some solutions like changing phase-ordering, which is much more complex. Attaching flag to every Use would solve it. But multiple calculation of case-sensitive information is expensive. I’m curious about whether it’s worthwhile & possible and whether there are
other trade-off methods?

Clang fold it to 2 in my tests: Compiler Explorer . What is the exact example/command-line?

Sorry for giving the example randomly. This Issue is the correct example.