[msan] Improve handling of Intrinsic::is_fpclass after c55fffe
authorVitaly Buka <vitalybuka@google.com>
Fri, 28 Apr 2023 22:13:52 +0000 (15:13 -0700)
committerVitaly Buka <vitalybuka@google.com>
Fri, 28 Apr 2023 23:27:31 +0000 (16:27 -0700)
commit67caff6f32bd7846bf2fe9310a789c6729939f37
tree78bfeaec7946f67cc63cff4e03515d645a261d5b
parent24ca728dc60f5e136fa017c3611647d146ab88ed
[msan] Improve handling of Intrinsic::is_fpclass after c55fffe

c55fffe replaced fcmp with fpclass.

```
declare i1 @llvm.is.fpclass(<fptype> <op>, i32 <test>)
declare <N x i1> @llvm.is.fpclass(<vector-fptype> <op>, i32 <test>)
```

Perfect fix will require checking bits of <op> corresponding to <test>
argument. For now just propagate shadow without reporting before
intrinsic. Still existing handling of fcmp is also simple OR, so it's
not making it worse.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D149491
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/test/Instrumentation/MemorySanitizer/is-fpclass.ll