@@ -406,7 +406,7 @@ already inherently target-dependent anyway.
406406
407407If some canonicalization narrow/widen the integer width of expressions, please
408408check ` shouldChangeType() ` first. Otherwise, we may evaluate the expression
409- in illegal/inefficient types. For vector types, follow the instructions below.
409+ in illegal/inefficient types.
410410
411411For vector-specific transforms that require cost-modelling, the VectorCombine
412412pass can be used instead. In very rare circumstances, if there are no other
@@ -415,7 +415,7 @@ AggressiveInstCombine.
415415
416416Generally, we prefer unsigned operations over signed operations in the middle-end, even
417417if signed operations are more efficient on some targets. The following is an incomplete
418- list of canonicalizations that implemented in InstCombine:
418+ list of canonicalizations that are implemented in InstCombine:
419419
420420| Original Pattern | Canonical Form | Condition |
421421| ------------------------------| ----------------------------| -------------------------------|
@@ -554,12 +554,12 @@ One-use checks can be performed using the `m_OneUse()` matcher, or the
554554
555555### Flag handling
556556
557- When possible, propagate poison-generating flags like ` nuw ` and ` nsw ` since they may be
558- hard to salvage later. If it is not free (e.g. requires additional complexity like ` willNotOverflow `
559- or KnownBits queries), don't do that .
557+ When possible, favour propagation of poison-generating flags like ` nuw ` and ` nsw ` since they may be
558+ hard to salvage later. Avoid doing so if it introduces additional complexity (e.g. requires querying ` willNotOverflow `
559+ or KnownBits) .
560560
561561Be careful with in-place operand/predicate changes, as poison-generating flags may not be valid for new
562- operands. It is recommended to create a new instruction with carefully handling of flags. If not
562+ operands. It is recommended to create a new instruction with careful handling of flags. If not
563563applicable, call ` Instruction::dropPoisonGeneratingFlags() ` to clear flags in a conservative manner.
564564
565565Do not rely on fcmp's ` nsz ` flag to perform optimizations. It is meaningless for fcmp so it should not affect
0 commit comments