[PATCH] D115460: Add FMF to hasPoisonGeneratingFlags/dropPoisonGeneratingFlags

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 11:40:34 PST 2021


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/shuffle_select-inseltpoison.ll:779
 
 define <4 x double> @fdiv_fdiv(<4 x double> %v0) {
 ; CHECK-LABEL: @fdiv_fdiv(
----------------
I looked at the code for this and related transforms in "foldSelectShuffle", and it's a mess.
We have lots of miscompiles like this:
https://alive2.llvm.org/ce/z/MHoacO
...and I don't think proposed but uncommitted patches like D93818 / D103874 resolve those. 

We probably need to add an identity shuffle with undef/poison elements preserved from the original code. Otherwise, we are potentially leaking poison from the variable value in the original code. This could take a few patches to fix, so I wouldn't hold this patch up for it (but I'll try to get that sorted out soon).


================
Comment at: llvm/test/Transforms/PhaseOrdering/ARM/mve-floatreduce.ll:16
 ; CHECK-NEXT:    [[TMP4:%.*]] = bitcast <4 x i32> [[TMP3]] to <8 x half>
-; CHECK-NEXT:    [[TMP5:%.*]] = fadd fast <8 x half> [[TMP1]], [[TMP4]]
+; CHECK-NEXT:    [[TMP5:%.*]] = fadd reassoc nsz arcp contract afn <8 x half> [[TMP1]], [[TMP4]]
 ; CHECK-NEXT:    [[TMP6:%.*]] = extractelement <8 x half> [[TMP5]], i32 0
----------------
This diff should have disappeared with the rebase?


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

https://reviews.llvm.org/D115460



More information about the llvm-commits mailing list