================
@@ -524,9 +524,7 @@ define i64 @utest_f64i64(double %x) {
 ; CHECK-NEXT:    local.get 0
 ; CHECK-NEXT:    call __fixunsdfti
 ; CHECK-NEXT:    local.get 1
-; CHECK-NEXT:    i32.const 8
-; CHECK-NEXT:    i32.add
-; CHECK-NEXT:    i64.load 0
+; CHECK-NEXT:    i64.load 8
----------------
workingjubilee wrote:

hmm. in general, more folds are valid with naturally-aligned types, because if 
you see two random 4-byte-aligned types, using an 8-byte-aligned load is only 
valid if they're on the same boundary. LLVM tends to allow these sorts of 
things that are only relevant for some machines to creep into its global 
reasoning about optimization, and not with no reason: it's always safer to do 
the more conservative optimization that is valid on all machines.

so wasm's model might suggest it shouldn't be affected by this, but in practice 
LLVM reasons substantially about this. so I am not surprised a machine model 
that _should_ care less still optimizes better.

https://github.com/llvm/llvm-project/pull/119204
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to