[PATCH] D13235: [mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 03:40:17 PDT 2015


dsanders added a comment.

Thanks. The new commit message is a lot better but I need to re-iterate one important point.

> Problem was reported on bugzilla as bug 2206.


Most people would read this as referring to https://llvm.org/PR2206 but the solution isn't to link to our internal bugzilla. The key point was that our internal bugzilla tickets mean nothing to the wider LLVM community. Please drop this sentence.

---

LGTM with our internal bugzilla reference removed and the test case fixed.


================
Comment at: test/CodeGen/Mips/llvm-ir/sqrt.ll:13-15
@@ +12,4 @@
+
+; CHECK-LABEL: sqrt_fn:
+; CHECK-NOT: sqrtf
+; CHECK: sqrt
----------------
The CHECK-NOT doesn't quite achieve what you intended. Consider:
  sqrt_fn:
    ...
    jal sqrtf
The CHECK-LABEL will match the sqrt_fn: as intended, the CHECK will match the 'sqrt' in 'jal sqrtf'. After these two matches are made, the CHECK-NOT will check that sqrtf doesn't match between the other two matches. This will successfully find zero matches and the test will mistakenly pass.

I'd just add the registers to the instruction I want to match like so:
  ; CHECK: sqrt $f0, $f12
with that, no CHECK-LABEL or CHECK-NOT is necessary.


http://reviews.llvm.org/D13235





More information about the llvm-commits mailing list