[llvm] [DAGCombiner] Optimize more vector element extractions. (PR #80520)

Harald van Dijk via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 4 14:37:01 PST 2024


================
@@ -190,10 +190,6 @@ define <2 x half> @v_test_canonicalize_build_vector_v2f16(half %lo, half %hi) #1
 ; CI-LABEL: v_test_canonicalize_build_vector_v2f16:
 ; CI:       ; %bb.0:
 ; CI-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; CI-NEXT:    v_cvt_f16_f32_e32 v0, v0
-; CI-NEXT:    v_cvt_f16_f32_e32 v1, v1
-; CI-NEXT:    v_cvt_f32_f16_e32 v0, v0
-; CI-NEXT:    v_cvt_f32_f16_e32 v1, v1
 ; CI-NEXT:    s_setpc_b64 s[30:31]
----------------
hvdijk wrote:

Oh, I see... It wasn't directly, I think, the `fcanonicalize` was getting compiled to a no op, but yeah, that may have been because other operations were guaranteed to result in an already-canonical result. I'll take a closer look.

https://github.com/llvm/llvm-project/pull/80520


More information about the llvm-commits mailing list